Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

Dashboard provisioning is interactive #128

Closed
paulfantom opened this issue Jan 8, 2019 · 6 comments · Fixed by #134
Closed

Dashboard provisioning is interactive #128

paulfantom opened this issue Jan 8, 2019 · 6 comments · Fixed by #134
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@paulfantom
Copy link
Member

Using synchronize can ask operator for credentials which isn't a good user experience and we shouldn't have interactive shell when connection is already established.

Issue was implemented by merging #121 (@mxbossard please take a look)

This issue can be seen for example here: https://travis-ci.org/cloudalchemy/demo-site/builds/476952246#L1466

This can be resolved by either:

  • rewriting role to use copy instead of synchronize
  • changing how synchronize is used.
@paulfantom paulfantom added bug Something isn't working help wanted Extra attention is needed labels Jan 8, 2019
@paulfantom
Copy link
Member Author

@paulfantom
Copy link
Member Author

After reading more about the issue (https://docs.ansible.com/ansible/latest/modules/synchronize_module.html#notes) it turns out that we cannot use synchronize for completely non-interactive session:

Currently there are only a few connection types which support synchronize (ssh, paramiko, local, and docker) because a sync strategy has been determined for those connection types. Note that the connection for these must not need a password as rsync itself is making the connection and rsync does not provide us a way to pass a password to the connection.

So we need to rewrite it to use copy.

@mxbossard
Copy link
Contributor

Ok, so we need a couple of thinking.

We should :

  1. list files in local tmp dashboard directory
  2. list files in remote directory
  3. Remove dst - src from remote directory
  4. Copy modified local src to remote directory

I have some questions :

  • If we always copy every src files to remote directory, does it break idempotency ? It shoul'd not I think.
  • Do you think I could reliably use arithmetic operation on array in ansible to achieve the remote files removal ?

@paulfantom
Copy link
Member Author

If we always copy every src files to remote directory, does it break idempotency

copy can copy files if src and dst checksum are different and this behavior provides idempotency. The only problem here is removal. We could probably register contents of src and dst directories and use one of the ansible provided jinja filters to create a list of files which are in dst but are not in src. This list can be later used to remove files from dst. This way removal would be optional and copying files would be idempotent.

@mxbossard
Copy link
Contributor

I may propose a fix tomorow afternoon.

@lock
Copy link

lock bot commented Apr 21, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Apr 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants