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

Add check for rabbitmq queue master locator policy #382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

freyes
Copy link
Member

@freyes freyes commented Aug 11, 2020

This new test verifies that rabbitmq-server picked up the configured policy
in the juju config option queue-master-locator.

The test will run for Ubuntu series >= bionic since it's when this
configuration option was introduced.

Related-Bug: #1890759

This new test verifies that rabbitmq-server picked up the configured policy
in the juju config option queue-master-locator.

The test will run for Ubuntu series >= bionic since it's when this
configuration option was introduced.

Related-Bug: #1890759
Copy link
Contributor

@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.

I'm slightly on the fence about whether this is a functional test (i.e. tested during a CI run), rather than a unit test (did the charm write the config file correctly). It feels more like the latter?

@freyes
Copy link
Member Author

freyes commented Dec 11, 2020

I'm slightly on the fence about whether this is a functional test (i.e. tested during a CI run), rather than a unit test (did the charm write the config file correctly). It feels more like the latter?

I was making some tests to confirm or deny if rabbitmq-server was doing any validation if the configured queue_master_locator was valid, and it doesn't

root@juju-cc7dcd-0:~# grep queue /etc/rabbitmq/rabbitmq.config 
        {queue_master_locator, <<"ubuntu">>},
root@juju-cc7dcd-0:~# systemctl restart rabbitmq-server
root@juju-cc7dcd-0:~# rabbitmqctl eval 'application:get_env(rabbit, queue_master_locator).'
{ok,<<"ubuntu">>}

do you have any suggestions on how to test this? I was thinking on creating multiple queues (~30) and make sure they got correctly balanced. the other option is assume there will be many queues already created (since there is an openstack deployed using rabbit) and just do the math making sure they were balanced as expected.

openstack-mirroring pushed a commit to openstack/charm-rabbitmq-server that referenced this pull request Dec 15, 2020
queue-master-locator is a configuration option supported by
rabbitmq-server since 3.6, it allows to have control of where the
master queue will be created.

Change-Id: I38cc019b73d062572e19bd532b6bccdaf88638ba
Func-Test-PR: openstack-charmers/zaza-openstack-tests#382
Closes-Bug: #1890759
Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
openstack-mirroring pushed a commit to openstack/openstack that referenced this pull request Dec 15, 2020
* Update charm-rabbitmq-server from branch 'master'
  to 07ec03b5d7a13aa40a2d6e2751c39ba4e5d7dedd
  - Add queue-master-locator config option
    
    queue-master-locator is a configuration option supported by
    rabbitmq-server since 3.6, it allows to have control of where the
    master queue will be created.
    
    Change-Id: I38cc019b73d062572e19bd532b6bccdaf88638ba
    Func-Test-PR: openstack-charmers/zaza-openstack-tests#382
    Closes-Bug: #1890759
    Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
@ajkavanagh
Copy link
Contributor

do you have any suggestions on how to test this? I was thinking on creating multiple queues (~30) and make sure they got correctly balanced. the other option is assume there will be many queues already created (since there is an openstack deployed using rabbit) and just do the math making sure they were balanced as expected.

I guess I'm a bit confused. Is this testing whether rabbitmq is working correctly, or whether the charm is configuring rabbitmq correctly. If the later, then it's verifying whether the config files are being written correctly (unit test territory). If it's the former, then aren't we outside of the remit of charm testing? i.e. that is verifying whether rabbitmq does what it says it does with appropriate config values. I must be missing something here?

I guess we do do some application verification in zaza-openstack-tests, but it's mostly around "did we configure a whole slew of applications correctly" (i.e. launch and instance and check we can ping it). I'm a bit concerned (but this may well be misplaced) that we don't turn z-o-t into a payload testing framework to verify whether the payloads do what they say they do?

@ajkavanagh ajkavanagh added the stale Review is stale; needs action from contributor; may be deleted in the near future. label Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Review is stale; needs action from contributor; may be deleted in the near future.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants