Bug 1244856 - openstack overcloud update stack overcloud requires an undocumented argument
Summary: openstack overcloud update stack overcloud requires an undocumented argument
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-rdomanager-oscplugin
Version: Director
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: y1
: 7.0 (Kilo)
Assignee: Marek Aufart
QA Contact: Udi Kalifon
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-20 15:36 UTC by Attila Fazekas
Modified: 2023-02-22 23:02 UTC (History)
7 users (show)

Fixed In Version: python-rdomanager-oscplugin-0.0.10-1.el7ost
Doc Type: Bug Fix
Doc Text:
Unclear help text and bug in parameter passing for the "openstack overcloud update stack" operation meant users needed to specify both plan and stack names. This fix removes the need for the stack name. However, the update command now requires either the Tuskar plan ID or the Heat template collection location.
Clone Of:
Environment:
Last Closed: 2015-10-08 12:15:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gerrithub.io 243718 0 None None None Never
Red Hat Product Errata RHSA-2015:1862 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise Linux OpenStack Platform 7 director update 2015-10-08 16:05:50 UTC

Description Attila Fazekas 2015-07-20 15:36:45 UTC
Description of problem:
 openstack help overcloud update stack
usage: openstack overcloud update stack [-h] [--plan PLAN] [-i] [-a]
                                        [--templates [TEMPLATES]]
                                        [-e <HEAT ENVIRONMENT FILE>]
                                        [stack]

Updates packages on overcloud nodes

positional arguments:
  stack                 Name or ID of heat stack to scale (default=Env:
                        OVERCLOUD_STACK_NAME)

optional arguments:
  -h, --help            show this help message and exit
  --plan PLAN           Name or ID of tuskar plan to scale (default=Env:
                        OVERCLOUD_PLAN_NAME)
  -i, --interactive
  -a, --abort
  --templates [TEMPLATES]
                        The directory containing the Heat templates to deploy
  -e <HEAT ENVIRONMENT FILE>, --environment-file <HEAT ENVIRONMENT FILE>
                        Environment files to be passed to the heat stack-
                        create or heat stack-update command. (Can be specified
                        more than once.)
[stack@instack nova]$ openstack overcloud update stack
ERROR: openstack ERROR: 404 Not Found

The resource could not be found.

   


Version-Release number of selected component (if applicable):
python-rdomanager-oscplugin-0.0.8-38.el7ost.noarch


Neither the help or the error message useful about how this command supposed to be used.

The secret missing arg.:
openstack overcloud update stack overcloud --plan overcloud

in this case it returns with something sounds like request was accepted.
'starting package update on stack overcloud'

Comment 3 chris alfonso 2015-07-22 17:35:44 UTC
We should probably default to the --templates if neither --plan or --templates are provided.

Comment 5 Marios Andreou 2015-07-31 12:26:12 UTC
Looking at this for doctext. I think there is some confusion looking at the comments; this isn't about an actual argument being passed to the update operation, rather it is imo 2 bugs, one with the help text:

usage: openstack overcloud update stack [-h] [--plan PLAN] [-i] [-a]
                                        [--templates [TEMPLATES]]
                                        [-e <HEAT ENVIRONMENT FILE>]
                                        [stack]


replacing that last [stack] with [stack_name] might make it clearer: doing something like:

openstack overcloud update stack foo
ERROR: openstack ERROR: The Stack (foo) could not be found.

At least tells me something useful. And the other is in the way the stack name defaults in the plugin, like

'(default=Env: OVERCLOUD_STACK_NAME)' -  which means if not set it will likely default to ""

(you can confirm this is what is happening with the 404 at least):

openstack overcloud update stack ""
ERROR: openstack ERROR: 404 Not Found


We can put a check somewhere like https://github.com/rdo-management/python-rdomanager-oscplugin/blob/master/rdomanager_oscplugin/v1/overcloud_update.py#L65
to make sure these are set and exit otherwise ...

BUT I am confused why we have 2 ways to refer to the deployment by plan id and  stack id - not sure what the intent here was/is.

At the same time there does appear to be a bona-fide

Comment 6 Marios Andreou 2015-07-31 12:28:04 UTC
haha i rearranged some text before posting the above.. the last line wasn't meant to giveany more information :) (was  going to talk about the bona-fide bug with the defaulting to "")

Comment 7 Marios Andreou 2015-07-31 12:51:59 UTC
added doctext as known issue

Comment 8 Ana Krivokapic 2015-08-19 17:26:44 UTC
Looks like the help text lists --plan as optional, when it's actually required.

Comment 9 Marek Aufart 2015-08-20 12:34:41 UTC
Patch submitted for review. One from plan and templates args is required now. Stack update with a plan is not default anymore.

Example:
$ openstack overcloud update stack
usage: openstack overcloud update stack [-h]
                                        (--plan PLAN | --templates [TEMPLATES])
                                        [-i] [-a] [-e <HEAT ENVIRONMENT FILE>]
                                        [stack]
openstack overcloud update stack: error: one of the arguments --plan --templates is required

Comment 10 Marek Aufart 2015-09-03 11:25:12 UTC
https://review.gerrithub.io/#/c/243718/ was merged to midstream

Comment 12 Udi Kalifon 2015-09-08 11:29:23 UTC
Verified: python-rdomanager-oscplugin-0.0.10-1.el7ost.noarch

Comment 14 errata-xmlrpc 2015-10-08 12:15:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:1862


Note You need to log in before you can comment on or make changes to this bug.