neutron-db-manage returns SUCCESS on wrong subproject name

Bug #1898015 reported by Radosław Piliszek
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Confirmed
Low
Unassigned
oslo.config
New
Undecided
Unassigned

Bug Description

(neutron-server)[neutron@os-controller-1 /]$ neutron-db-manage --subproject neutron-sfc upgrade --contract
argument --subproject: Invalid String(choices=['vmware-nsx', 'networking-sfc', 'neutron-vpnaas', 'networking-l2gw', 'neutron-fwaas', 'neutron', 'neutron-dynamic-routing']) value: neutron-sfc
(neutron-server)[neutron@os-controller-1 /]$ echo $?
0

Tested Train and Victoria, possibly behaved like this since forever.

Tags: usability
tags: added: usabi
Changed in neutron:
status: New → Confirmed
importance: Undecided → Low
tags: added: usability
removed: usabi
Revision history for this message
Lajos Katona (lajos-katona) wrote :

The 0 return code comes from here as I see:
https://opendev.org/openstack/oslo.config/src/commit/dce2afd7898d618336e1859283bcedea8336a7a2/oslo_config/cfg.py#L2960

raise SystemExit(2) or raise SystemExit('foo') should give what you expect.
I am not sure if it is intentionally not using argument for SystemExit.

Revision history for this message
Brian Haley (brian-haley) wrote :

Added oslo.config to see if changing this code is ok, but diagnosis seems correct.

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.