Open sblaisot opened 5 years ago
@saltstack/team-cloud Thoughts?
script_args: |
-j '{{"master": "salt-master"}}' stable 2019.2
The solution would be to inform people to pass information through like this, and then just call .format() on all strings in the config before passing them to arguments on the minions.
Can probably be done piece mail, but without handling that, the openstack values will fail.
Alternatively, a patch could be pushed upstream to configure disabling the .format() calls.
I don't think it's a good idea to have the same argument with the same value configured two different ways depending on the backend provider driver used.
I see this bug is thill in "pending discussion" and "block". Do you still need something from me?
I think there probably hasn't been discussion on this, as far as what would be the best approach here. Sounds like maybe the best approach would be to push the upstream patch to allow disabling the formatting, and then adding that flag when we call it.
That would satisfy your desires @sblaisot? If I understand, you don't want to have to repeat things, like have script_args
everywhere like gtmanfred proposed, right?
I'm not super familiar with the underlying code, but it seems like that would be the least intrusive change that does the most amount of good.
The other fix I suppose would be for us to detect this backend and just do something like script_args = script_args.replace('{', '{{').replace('}', '}}')
, but that seems less desirable as well :suspect:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
issue not fixed, please do not close
Thank you for updating this issue. It is no longer marked as stale.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
issue not fixed, please do not close
Thank you for updating this issue. It is no longer marked as stale.
@sblaisot did you have a chance to read my previous comment? Still waiting on a response to that.
I agree having a way upstream to disable formatting is probably the best way.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Not stalled, still confirmed.
Thank you for updating this issue. It is no longer marked as stale.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
No
Thank you for updating this issue. It is no longer marked as stale.
Description of Issue/Question
Under salt-cloud 2019.2, using
script_args
at provider level to pass options-j json_object
tobootstrap-salt
fails because openstacksdk tries to apply a python formatting to all config options and curly braces in json object fails python formatting. The culprit line of openstacksdk code is hereEscaping curly-braces does not work. Doubling them to escape python-formatting let you instanciate VM but this fails later on when executing
bootstrap-salt
because this is not a valid json object anymore.Workaround is to move the
script:
andscript_args
configuration at profile level but, hey, who wants to duplicate configuration in each profile if they are the same everywhere?Setup
Note: I don't use
/etc/openstack/cloud.yml
but rather define all provider onfiguration in/etc/salt/cloud.provider.d/<provider>.conf
Note2: If relevant, I use OVH public cloud, based on openstackUsing salt-cloud 2019.2 on Debian 9.
/etc/salt/cloud.providers.d/ovh-gra3.conf
:/etc/salt/cloud.providers.d/ovh-gra3.conf
:Steps to Reproduce Issue
(Include debug logs if possible and relevant.)
Versions Report