Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes endpoint discovery for RGW application under test #1217

Merged

Conversation

UtkarshBhatthere
Copy link
Contributor

@UtkarshBhatthere UtkarshBhatthere commented Jun 12, 2024

Charm-Ceph-RGW configures Apache for Admin/Public bindings. The original test queries the charm for the default public address (i.e. address on the "" binding) to perform object IO (S3) which fails because the endpoint is not correct. For IO test, we need to fetch the address bound to the PUBLIC juju space, this PR fetches the same with network-get and uses that to perform object IO instead.

The zaza test used the default endpoint as exposed by
the unit to perform object IO, however, SSL is configured
for PUBLIC,INTERNAL, and ADMIN bindings.

Signed-off-by: Utkarsh Bhatt <[email protected]>
Copy link
Contributor

@sabaini sabaini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like there exists a bug in zaza_model.get_unit_public_address()

Seeing as there have been numerous issues with this method in the past I wonder if there has been a regression.

This method also has two different implementations, with a feature flag switching between them. I wonder if setting this feature flag helps?

openstack-charmers/zaza#472

@UtkarshBhatthere
Copy link
Contributor Author

UtkarshBhatthere commented Jun 14, 2024

@sabaini

ubuntu@lab1-silo4-cpe-5501a315-0336-4dd7-a145-7133a8084963:~/.local/share/juju$ juju spaces
Name                Space ID  Subnets        
alpha               0                        
oam-space           1         10.X.246.164.0/22
public-space        2         10.X.246.172.0/22
internal-space      3         10.X.246.168.0/22
external-space      4         10.X.246.180.0/22
ceph-replica-space  5         10.X.246.176.0/22
undefined           6         10.Y.187.0/24
                                             
ubuntu@lab1-silo4-cpe-5501a315-0336-4dd7-a145-7133a8084963:~/.local/share/juju$ JUJU_DATA=/home/ubuntu/.local/share/juju/ fcbtest.zaza functest-test --model foundations-maas:ceph-standalone --tests zaza.openstack.charm_tests.ceph.tests.CephRGWTest
2024-06-14 14:48:58 [INFO] ## Running Test zaza.openstack.charm_tests.ceph.tests.CephRGWTest ##
2024-06-14 14:48:59 [WARNING] Unable to load charm config, deducing charm_name from cwd: "juju"
2024-06-14 14:49:00 [INFO] test_001_processes (zaza.openstack.charm_tests.ceph.tests.CephRGWTest)
2024-06-14 14:49:00 [INFO] Verify Ceph processes.
2024-06-14 14:49:00 [INFO]  ... 
2024-06-14 14:49:00 [INFO] Checking radosgw processes...
2024-06-14 14:49:11 [INFO] ok
2024-06-14 14:49:11 [INFO] test_002_services (zaza.openstack.charm_tests.ceph.tests.CephRGWTest)
2024-06-14 14:49:11 [INFO] Verify the ceph services.
2024-06-14 14:49:11 [INFO]  ... 
2024-06-14 14:49:11 [INFO] Checking radosgw services...
2024-06-14 14:49:14 [INFO] ok
2024-06-14 14:49:14 [INFO] test_003_object_storage_and_secondary_block (zaza.openstack.charm_tests.ceph.tests.CephRGWTest)
2024-06-14 14:49:14 [INFO] Verify Object Storage API and Secondary Migration block.
2024-06-14 14:49:14 [INFO]  ... 
2024-06-14 14:49:14 [INFO] Checking Object Storage API for Primary Cluster
2024-06-14 14:49:14 [INFO] Unit: ceph-radosgw/0, Endpoint: 10.X.246.173.3
2024-06-14 14:49:16 [INFO] Skipping Secondary Object gatewaty verification
2024-06-14 14:49:16 [INFO] ok
2024-06-14 14:49:16 [INFO] test_004_migration_and_multisite_failover (zaza.openstack.charm_tests.ceph.tests.CephRGWTest)
2024-06-14 14:49:16 [INFO] Perform multisite migration and verify failover.
2024-06-14 14:49:16 [INFO]  ... 
2024-06-14 14:49:16 [INFO] skipped 'Skipping Migration Test'
2024-06-14 14:49:16 [INFO] test_005_virtual_hosted_bucket (zaza.openstack.charm_tests.ceph.tests.CephRGWTest)
2024-06-14 14:49:16 [INFO] Test virtual hosted bucket.
2024-06-14 14:49:16 [INFO]  ... 
2024-06-14 14:49:16 [INFO] Skipping virtual hosted bucket test since primary rgw unit is not in active state
2024-06-14 14:49:16 [INFO] ok
2024-06-14 14:49:16 [INFO] ----------------------------------------------------------------------
2024-06-14 14:49:16 [INFO] Ran 5 tests in 17.072s
2024-06-14 14:49:16 [INFO] OK
2024-06-14 14:49:16 [INFO]  (skipped=1)
2024-06-14 14:49:16 [INFO] Events:
  Test zaza.openstack.charm_tests.ceph.tests.CephRGWTest:
    Start: 1718376538.627408
    Finish: 1718376556.7700348
    Elapsed Time: 18.142626762390137
    PCT Of Run Time: 100
Metadata: {}

Copy link
Contributor

@sabaini sabaini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR. after talking about this some more: This is not about getting the public address from the POV of juju but an address from the space named "public" -- this lgtm

@ajkavanagh
Copy link
Collaborator

@UtkarshBhatthere Please could you add some description into the PR about why this patch is needed; i.e does it fix a bug? Is it a regression being resolved? A workaround? i.e. we need something to explain why this should be included right up in the description of the PR. Thank.

Copy link
Collaborator

@ajkavanagh ajkavanagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hold until there is a description of the PR available.

@UtkarshBhatthere
Copy link
Contributor Author

@ajkavanagh Thanks for the reminder, I have added a description for the change.

Copy link
Collaborator

@ajkavanagh ajkavanagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; thanks for updating the description.

@ajkavanagh ajkavanagh merged commit a106024 into openstack-charmers:master Jun 18, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants