Skip to content
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

aws_ssm connection plugin should namespace its file transfers #221

Closed
abeluck opened this issue Sep 4, 2020 · 0 comments
Closed

aws_ssm connection plugin should namespace its file transfers #221

abeluck opened this issue Sep 4, 2020 · 0 comments
Assignees

Comments

@abeluck
Copy link

@abeluck abeluck commented Sep 4, 2020

SUMMARY

The aws_ssm connection plugin uses an s3 buckets to transfer files to instances. It writes these files directly to the root of the bucket. If multiple ansible processes are running and sharing the same bucket at the same time, collisions could happen.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

aws_ssm connection plugin

ANSIBLE VERSION

ansible 2.10.1rc2
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/user/.local/lib/python3.7/site-packages/ansible
executable location = /home/user/.local/bin/ansible
python version = 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]

CONFIGURATION

n/a

OS / ENVIRONMENT

debian 10

STEPS TO REPRODUCE
  1. use the aws_ssm plugin
  2. look at the s3 bucket it used
  3. observe that the files are not namespaced by instance id
EXPECTED RESULTS

The plugin should transfer files in namespaced keys (folders) to avoid collisions.

ACTUAL RESULTS

Files are written to the root of the s3 bucket.

abeluck added a commit to abeluck/community.aws that referenced this issue Sep 6, 2020
…fixes ansible-collections#221)

* files transferred to the s3 bucket are prefixed by the instance-id

The aws_ssm connection plugin uses an s3 buckets to transfer files to
instances. Instead of writing these files directly to the root of the
bucket, we prefix the object key with the instance id to prevent
collisions.
@jillr jillr self-assigned this Sep 9, 2020
jillr added a commit to jillr/community.aws that referenced this issue Sep 18, 2020
Files transferred to instances via the SSM connection plugin should use
folders within the bucket that are namespaced per-host, to prevent collisions.
Files should also be deleted from buckets when they are no longer required.

Fixes: ansible-collections#221
Fixes: ansible-collections#222

Based on work by @abeluck
jillr added a commit to jillr/community.aws that referenced this issue Sep 22, 2020
Files transferred to instances via the SSM connection plugin should use
folders within the bucket that are namespaced per-host, to prevent collisions.
Files should also be deleted from buckets when they are no longer required.

Fixes: ansible-collections#221
Fixes: ansible-collections#222

Based on work by @abeluck
jillr added a commit to jillr/community.aws that referenced this issue Sep 22, 2020
Files transferred to instances via the SSM connection plugin should use
folders within the bucket that are namespaced per-host, to prevent collisions.
Files should also be deleted from buckets when they are no longer required.

Fixes: ansible-collections#221
Fixes: ansible-collections#222

Based on work by abeluck

changelog
@jillr jillr closed this in #237 Oct 2, 2020
jillr added a commit that referenced this issue Oct 2, 2020
Files transferred to instances via the SSM connection plugin should use
folders within the bucket that are namespaced per-host, to prevent collisions.
Files should also be deleted from buckets when they are no longer required.

Fixes: #221
Fixes: #222

Based on work by abeluck

changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
@abeluck @jillr and others