Bug 1580073 - [OSP10] Unable to environment-update from environment-get
Summary: [OSP10] Unable to environment-update from environment-get
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-mistralclient
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z9
: 10.0 (Newton)
Assignee: Brad P. Crochet
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On: 1570315
Blocks: 1575414
TreeView+ depends on / blocked
 
Reported: 2018-05-19 20:39 UTC by David Vallee Delisle
Modified: 2020-02-19 19:15 UTC (History)
13 users (show)

Fixed In Version: python-mistralclient-2.1.2-2.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1570315
Environment:
Last Closed: 2020-02-19 19:15:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1769491 0 None None None 2018-05-19 21:06:49 UTC
OpenStack gerrit 569411 0 'None' ABANDONED Adding environment-get-definition for easy environment-update 2020-02-19 19:14:00 UTC

Description David Vallee Delisle 2018-05-19 20:39:20 UTC
+++ This bug was initially created as a clone of Bug #1570315 +++

Description of problem:
When we run environment-get to a file, modify the file and reimport it with environment-update without deleting the 2 date fields, the error message is not very explicit.

Version-Release number of selected component (if applicable):
python-openstack-mistral-3.0.2-12.el7ost.noarch
openstack-mistral-executor-3.0.2-12.el7ost.noarch
puppet-mistral-9.5.0-2.el7ost.noarch
openstack-mistral-engine-3.0.2-12.el7ost.noarch
python-mistralclient-2.1.2-1.el7ost.noarch
openstack-mistral-common-3.0.2-12.el7ost.noarch
openstack-mistral-api-3.0.2-12.el7ost.noarch


How reproducible:
All the time

Steps to Reproduce:
1. $ mistral environment-get -f yaml overcloud > overcloud.yaml
2. $ mistral environment-update -f yaml overcloud.yaml

Actual results:
ERROR (app) None


Expected results:
Exception in mistral/api/controllers/v2/environment.py should be raised or returned

171     def _validate_environment(env_dict, legal_keys):
172         if env_dict is None:
173             return
174 
175         if set(env_dict) - set(legal_keys):
176             raise exceptions.InputException(
177                 "Please, check your environment definition. Only: "
178                 "%s are allowed as definition keys." % legal_keys
179             )

Additional info:
[stack@pbnec1-l-rh-ucld-0 ~]$ mistral --debug environment-update -f yaml overcloud.yaml
DEBUG (v2) Making authentication request to https://192.168.4.2:13000/v2.0/tokens
DEBUG (extension) found extension EntryPoint.parse('table = cliff.formatters.table:TableFormatter')
DEBUG (extension) found extension EntryPoint.parse('json = cliff.formatters.json_format:JSONFormatter')
DEBUG (extension) found extension EntryPoint.parse('shell = cliff.formatters.shell:ShellFormatter')
DEBUG (extension) found extension EntryPoint.parse('value = cliff.formatters.value:ValueFormatter')
DEBUG (extension) found extension EntryPoint.parse('yaml = cliff.formatters.yaml_format:YAMLFormatter')
DEBUG (command) run(Namespace(columns=[], file=<open file 'overcloud.yaml', mode 'r' at 0x25d4c00>, formatter='yaml', max_width=0, noindent=False, prefix='', variables=[]))
ERROR (app) None
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 387, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 100, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/site-packages/mistralclient/commands/v2/environments.py", line 184, in take_action
    environment = mistral_client.environments.update(**data)
  File "/usr/lib/python2.7/site-packages/mistralclient/api/v2/environments.py", line 66, in update
    self._ensure_not_empty(name=name)
  File "/usr/lib/python2.7/site-packages/mistralclient/api/base.py", line 78, in _ensure_not_empty
    (self.resource_class.__name__, name))
APIException: None
Traceback (most recent call last):
  File "/usr/bin/mistral", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/mistralclient/shell.py", line 602, in main
    return MistralShell().run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 267, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 387, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 100, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/site-packages/mistralclient/commands/v2/environments.py", line 184, in take_action
    environment = mistral_client.environments.update(**data)
  File "/usr/lib/python2.7/site-packages/mistralclient/api/v2/environments.py", line 66, in update
    self._ensure_not_empty(name=name)
  File "/usr/lib/python2.7/site-packages/mistralclient/api/base.py", line 78, in _ensure_not_empty
    (self.resource_class.__name__, name))
mistralclient.api.base.APIException: None

Comment 15 Amit Ugol 2019-08-11 07:44:07 UTC
Same exact behavior as initial comment.

Comment 16 Alex Schultz 2020-02-19 19:15:07 UTC
We won't fix this for OSP10.


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