-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EC2 user-data error when spot_price != null #34978
Labels
affects_2.4
This issue/PR affects Ansible v2.4
aws
bug
This issue/PR relates to a bug.
cloud
module
This issue/PR relates to a module.
python3
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
Comments
Files identified in the description: If these files are inaccurate, please update the |
Can anyone confirm this bug? |
abadger
added a commit
to abadger/ansible
that referenced
this issue
Mar 20, 2018
The user_data field is base64 encoded inside of the boto library. In Python3, base64 must be used with byte strings. So we make sure to encode the user_data into a byte string before passing it on to the boto library. Fixes ansible#34978
@brainstorm I don't use ec2 but I do fix Python3 bugs. Can you test whether this PR fixes your issue? #37628 |
s-hertel
pushed a commit
that referenced
this issue
Mar 20, 2018
The user_data field is base64 encoded inside of the boto library. In Python3, base64 must be used with byte strings. So we make sure to encode the user_data into a byte string before passing it on to the boto library. Fixes #34978
abadger
added a commit
to abadger/ansible
that referenced
this issue
Mar 20, 2018
The user_data field is base64 encoded inside of the boto library. In Python3, base64 must be used with byte strings. So we make sure to encode the user_data into a byte string before passing it on to the boto library. Fixes ansible#34978 (cherry picked from commit 0d55081)
Woah, thanks @abadger! Will give it a try ;) |
nitzmahone
pushed a commit
that referenced
this issue
Mar 29, 2018
* Fix use of user_data field with spot_price in ec2 module (#37628) The user_data field is base64 encoded inside of the boto library. In Python3, base64 must be used with byte strings. So we make sure to encode the user_data into a byte string before passing it on to the boto library. Fixes #34978 (cherry picked from commit 0d55081) * Python3 ec2 fix added to changelog
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.4
This issue/PR affects Ansible v2.4
aws
bug
This issue/PR relates to a bug.
cloud
module
This issue/PR relates to a module.
python3
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
ISSUE TYPE
COMPONENT NAME
ec2
ANSIBLE VERSION
CONFIGURATION
$ ansible-config dump --only-changed
ANSIBLE_SSH_ARGS(/Users/romanvg/dev/pcgr-deploy/ansible/ansible.cfg) = -o ControlMaster=auto
HOST_KEY_CHECKING(/Users/romanvg/dev/pcgr-deploy/ansible/ansible.cfg) = False
INVENTORY_ENABLED(/Users/romanvg/dev/pcgr-deploy/ansible/ansible.cfg) = ['host_list', 'script', 'yaml', 'ini', 'constructed']
RETRY_FILES_ENABLED(/Users/romanvg/dev/pcgr-deploy/ansible/ansible.cfg) = False
OS / ENVIRONMENT
N/A
SUMMARY
There's a parsing error on the base64 encoding of
user-data
when spot-price has a defined price.https://github.com/brainstorm/pcgr-deploy/blob/master/ansible/aws.yml#L16
STEPS TO REPRODUCE
ansible-playbook aws.yaml
EXPECTED RESULTS
Clean instantiation of an ec2 instance, loading its corresponding user-data:
https://github.com/brainstorm/pcgr-deploy/blob/master/ansible/files/s3_user_data.sh
ACTUAL RESULTS
/cc @vladsaveliev
The text was updated successfully, but these errors were encountered: