[plugins] Variable substitution is not working

Bug #1479731 reported by Andrey Shestakov
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Triaged
Medium
Fuel Sustaining
Mitaka
Won't Fix
Medium
Fuel Python (Deprecated)
Newton
Triaged
Medium
Fuel Sustaining

Bug Description

Added task to deployment_tasks.yaml:
- id: test1
  type: shell
  role: master
  requires: [pre_deployment_start]
  required_for: [test2]
  parameters:
    cwd: /
    cmd: echo {CLUSTER_ID} > /var/lib/astute/test
    timeout: 180

After this task is done, file /var/lib/astute/test conatins text '{CLUSTER_ID}' instead of correct value.

Revision history for this message
Andrey Shestakov (ashestakov) wrote :

change for bug #1478076 fixes only:

Support {CLUSTER_ID} interpolation for 2 new tasks:
- copy_keys_ceph
- generate_keys_ceph

How about another tasks?

Revision history for this message
Vladimir Sharshov (vsharshov) wrote :

Andey, you are right. We discuss this in review https://review.openstack.org/#/c/207390/ for other bug https://launchpad.net/bugs/1478076

But this bug looks like feature. It require new default behavior for tasks parameters which should allow to interpolate
some pre-approved parameters.

Looks like we need Blueprint to cover it.

tags: added: module-nailgun
tags: added: granular
Changed in fuel:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 7.0
assignee: nobody → Vladimir Sharshov (vsharshov)
tags: added: feature
Changed in fuel:
assignee: Vladimir Sharshov (vsharshov) → Fuel Python Team (fuel-python)
Revision history for this message
Mike Scherbakov (mihgen) wrote :

How it affects plugin developer / user experience?

Revision history for this message
Ihor Kalnytskyi (ikalnytskyi) wrote :

Hm.. AFAIU, there's no way to place generated "keys" near keys generated by core components.. and therefore, generate keys per cluster.

Revision history for this message
Mike Scherbakov (mihgen) wrote :

How important it is for a user / plugin developer? Can dev easily work around this issue? Please provide more details.

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 7.0 → 8.0
Revision history for this message
Vladimir Sharshov (vsharshov) wrote :

Mike, this is very useful, because without this change deployment engineer could not use from box such things as {CLUSTER_ID}.

Plugin developer could not use such thing in it plugins at now moment at all.

In current moment if deployment engineer wants to support such thing for it own task, he need add simple, but required code https://review.openstack.org/207390.

Why it looks like feature?

I think, we should provide several variable for user/plugins developers/deployment engineer as:

- Cluster id;
- Master ip;
- Openstack version;
- Deployment id;
- variables from the settings like self.cluster.attributes.editable['public_ssl']['hostname']['value']

All of this variable required now additional code in Nailgun. It should be easy to add new variable for external user, in other hand it should be easy and safety for end user to use it.

Why it moved to 8.0?

It looks like feature which need separate blueprint. We have workaround for deployment engineer in 7.0. Plugin developer use data from astute.yaml in they need variables from the settings. We fixed https://bugs.launchpad.net/fuel/+bug/1430470 to help them with it.

Changed in fuel:
milestone: 8.0 → 7.0
status: Confirmed → Won't Fix
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 7.0 → 8.0
no longer affects: fuel/8.0.x
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
Changed in fuel:
milestone: 8.0 → 9.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.