Invalid error message when wrong orchestration sub command is given

Bug #1571966 reported by Kanagaraj Manickam
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
cliff
Fix Released
Medium
Ali Jabbar

Bug Description

When the wrong sub command is given as below (tempalte is given with spell mistake), error message reports "openstack: 'orchestration' is not an openstack command". But this should be reported with mentioning that 'tempalte' command is invalid"

More details below

manickan@mrkanag-os:~/workspace/hot-tutorials$ openstack orchestration tempalte validate -t hello-world-1.yaml
openstack: 'orchestration' is not an openstack command. See 'openstack --help'.
Did you mean one of these?
  orchestration build info
  orchestration resource type list
  orchestration resource type show
  orchestration service list
  orchestration template function list
  orchestration template validate
  orchestration template version list
  configuration show
manickan@mrkanag-os:~/workspace/hot-tutorials$ openstack orchestration template validate -t hello-world-1.yaml
Description: First heat hot template used to demonstrate the hot template sections.
Parameters: {}
manickan@mrkanag-os:/opt/stack/python-heatclient$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean
manickan@mrkanag-os:/opt/stack/python-heatclient$

description: updated
Changed in heat:
importance: Undecided → Medium
Changed in heat:
assignee: nobody → Pankaj Mishra (pankaj-mishra)
Thomas Herve (therve)
affects: heat → python-heatclient
ashwini (mashu97)
Changed in python-heatclient:
assignee: Pankaj Mishra (pankaj-mishra) → ashwini (mashu97)
Revision history for this message
Ali Jabbar (jabbar-ali) wrote :

I am assigning this bug to me.

Changed in python-heatclient:
assignee: ashwini (mashu97) → Ali Jabbar (jabbar-ali)
Revision history for this message
Jaspreet Singh Rawel (jaspreetsinghrawel) wrote :

Reproduced using devstack on mitaka branch.

Changed in python-heatclient:
status: New → Confirmed
Revision history for this message
Ali Jabbar (jabbar-ali) wrote :

Problem reproduced
stack@cinv-V:/home/cinv/devstack$ openstack orchestration tempalte validate -t hello-world-1.yaml
openstack: 'orchestration' is not an openstack command. See 'openstack --help'.
Did you mean one of these?
  orchestration build info
  orchestration resource type list
  orchestration resource type show
  orchestration service list
  orchestration template function list
  orchestration template version list
  configuration show
stack@cinv-V:/home/cinv/devstack$

Changed in python-heatclient:
status: Confirmed → In Progress
Revision history for this message
Rabi Mishra (rabi) wrote :

I think this is an openstackclient issue instead. Any other command will have the similar message. If you try:

#openstack server xxx

openstack: 'server' is not an openstack command. See 'openstack --help'.
Did you mean one of these?
  server add fixed ip
  server add floating ip
  server add security group
  server add volume
  server backup create
....

Revision history for this message
Ali Jabbar (jabbar-ali) wrote :

We found that root cause of this issue in the cliff code :
https://bugs.launchpad.net/python-cliff/+bug/1640031

cliff/app.py

def run_subcommand( ,)
 >>> Here it is printing argv[0] in every case.

Revision history for this message
Ali Jabbar (jabbar-ali) wrote :
affects: python-heatclient → python-cliff
Revision history for this message
Ali Jabbar (jabbar-ali) wrote :

https://review.openstack.org/#/c/394884/

----------------
self.stdout.write('%s: \'%s\' is not %s %s command. '
                                  'See \'%s --help\'.\n'
                                  % (self.NAME, ' '.join(argv), article,
                                      self.NAME, self.NAME))
self.stdout.write('Did you mean one of these?\n')

Changed in python-cliff:
status: In Progress → Fix Released
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.