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

Always write cloud config #533

Merged
merged 1 commit into from
Apr 24, 2018

Conversation

HighwayofLife
Copy link
Contributor

If an empty cloud config was written to the file system, which may be in the case of a previous failed deployment, subsequent runs will not write a good cloud config file. Likewise, currently any changes to a cloud config will not update existing cloud configuration. This PR allows changes to be made to a cloud config.

@ibuildthecloud
Copy link
Contributor

Should we be concerned about atomic writes (write to temp and move)? It is possible that you write a empty or half file to a running and valid cluster.

@HighwayofLife
Copy link
Contributor Author

I'm not sure I understand your question. I do think that maybe write to temp and move may be a better operation than echo "{json}" > file.

@ibuildthecloud
Copy link
Contributor

@HighwayofLife sorry, i was just saying that both the existing code and this change would be more reliable if they used an atomic write approach. So t=$(mktemp); echo $i > $t; mv $t file

@HighwayofLife
Copy link
Contributor Author

@ibuildthecloud Updated with atomic-write approach. Thanks!

Copy link
Contributor

@moelsayed moelsayed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you.

@galal-hussein
Copy link
Contributor

#454

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants