Bug 1466232 - extra_vars missing in retirement_job_options
Summary: extra_vars missing in retirement_job_options
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: cfme-future
Assignee: Drew Bomhof
QA Contact: Dave Johnson
URL:
Whiteboard: automate:retirement
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-29 10:01 UTC by Kim Borup
Modified: 2017-12-25 14:59 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-05 19:20:33 UTC
Category: ---
Cloudforms Team: Ansible
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kim Borup 2017-06-29 10:01:44 UTC
Description of problem:
Variables used when provisioning using ansble, does not get used when doing a retirement. 

How reproducible:
All the time

Steps to Reproduce:
1. Create ansible playbook for provision and retirement that uses a variable.
2. create service dialog that ask for variable name
3. Create Catalog item that uses service dialog. 
4. Order Catalog item providing name for variable. 
5. Retire Service item which will then fail. 

Actual results:
Variable does not get passed during retirement.

Expected results:
Variable from provisioning get added when doing retirement in order to link to the correct projects in ie OCP.

Additional info:
From API. 

        "dialog": {
            "dialog_credential": "10",
            "dialog_hosts": "host.example.com",
            "dialog_param_projectname": "thedebug"
        },
        "provision_job_options": {
            "hosts": "host.example.com",
            "extra_vars": {
                "projectname": "thedebug"
            },
            "credential": "3",
            "inventory": 16
        },
        "retirement_job_options": {
            "hosts": "host.example.com",
            "extra_vars": {},
            "inventory": 17
        }
    },

        "retirement_job_options": {
            "hosts": "host.example.com",
            "extra_vars": {}, <- This is where i would expect the extra vars from provisioning to be as you can see from the provision_job_options.

Comment 2 Drew Bomhof 2017-09-05 19:20:33 UTC
Hi Kim,

Retirement was designed to run without user input. 

If 'copy from provision' is clicked at service creation / edit, the extra_vars from provision would be copied over.  However, if the dialog is modified to expect user input, that input will not be pushed into the retirement task.  In my opinion this is working as expected.


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