neutron-sanity-check --no* BoolOpts don't work

Bug #1549394 reported by Terry Wilson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Terry Wilson
Kilo
New
Undecided
Unassigned

Bug Description

neutron-sanity-check allows the passing of --config-file and --config-dir to automatically set which tests are run based on neutron's configuration. Since the test options are BoolOpts, they automatically register --no* inverse options. This implies that one could pass --config-file /etc/neutron/l3_agent.ini and then disable the dnsmasq_version check with --nodnsmasq_version.

neutron-sanity-check uses set_override() to override the test configuration, which also overrides the CLI. Using set_default() should fix the issue.

tags: added: liberty-backport-potential
tags: added: kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/284301

Changed in neutron:
assignee: nobody → Terry Wilson (otherwiseguy)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/284301
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=c28ad6b8e38884c6e1cc7504e478608349fc0376
Submitter: Jenkins
Branch: master

commit c28ad6b8e38884c6e1cc7504e478608349fc0376
Author: Terry Wilson <email address hidden>
Date: Tue Feb 23 06:16:13 2016 -0600

    Fix sanity check --no* BoolOpts

    If --config-{file,dir} are used to genearate a list of tests to
    run, using set_override() will also override any options passed
    via the CLI.

    For example, on Centos 7 which uses dnsmasq 2.66, running:

      neutron-sanity-check --nodnsmasq_version --config-file \
        /etc/neutron/l3_agent.ini

    will still run and fail the dnsmasq version test. Using
    set_default() allows using --config-{file,dir} and --no* in
    conjunction.

    Closes-Bug: #1549394
    Change-Id: I5b9e520add7324660148c4451bbef54c0dfe428e

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/284556

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/284598

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/liberty)

Reviewed: https://review.openstack.org/284556
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=2b4838e1984ddc9d02c74b147598eda80fb7bdde
Submitter: Jenkins
Branch: stable/liberty

commit 2b4838e1984ddc9d02c74b147598eda80fb7bdde
Author: Terry Wilson <email address hidden>
Date: Tue Feb 23 06:16:13 2016 -0600

    Fix sanity check --no* BoolOpts

    If --config-{file,dir} are used to genearate a list of tests to
    run, using set_override() will also override any options passed
    via the CLI.

    For example, on Centos 7 which uses dnsmasq 2.66, running:

      neutron-sanity-check --nodnsmasq_version --config-file \
        /etc/neutron/l3_agent.ini

    will still run and fail the dnsmasq version test. Using
    set_default() allows using --config-{file,dir} and --no* in
    conjunction.

    Closes-Bug: #1549394
    Change-Id: I5b9e520add7324660148c4451bbef54c0dfe428e
    (cherry picked from commit c28ad6b8e38884c6e1cc7504e478608349fc0376)

tags: added: in-stable-liberty
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b3

This issue was fixed in the openstack/neutron 8.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/kilo)

Reviewed: https://review.openstack.org/284598
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5d920b8ad5bdadc3355da645a77377f993ae2c80
Submitter: Jenkins
Branch: stable/kilo

commit 5d920b8ad5bdadc3355da645a77377f993ae2c80
Author: Terry Wilson <email address hidden>
Date: Tue Feb 23 06:16:13 2016 -0600

    Fix sanity check --no* BoolOpts

    If --config-{file,dir} are used to genearate a list of tests to
    run, using set_override() will also override any options passed
    via the CLI.

    For example, on Centos 7 which uses dnsmasq 2.66, running:

      neutron-sanity-check --nodnsmasq_version --config-file \
        /etc/neutron/l3_agent.ini

    will still run and fail the dnsmasq version test. Using
    set_default() allows using --config-{file,dir} and --no* in
    conjunction.

    Closes-Bug: #1549394
    Change-Id: I5b9e520add7324660148c4451bbef54c0dfe428e
    (cherry picked from commit c28ad6b8e38884c6e1cc7504e478608349fc0376)
    (cherry picked from commit 03c0b797bb8a67de47f89249f91f0f250aea0227)

tags: added: in-stable-kilo
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 7.0.4

This issue was fixed in the openstack/neutron 7.0.4 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 2015.1.4

This issue was fixed in the openstack/neutron 2015.1.4 release.

tags: removed: kilo-backport-potential liberty-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/neutron 2015.1.4 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.