-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix LXC container implementations #219
Conversation
Add new line to lxc.yml
FYI @acdoussan Look ok? |
Wow, someone else already using this, pretty cool! Not assuming the user is root makes total sense, this LGTM. My assumption was that the hosts would be dedicated for kubernetes since containers have a very low overhead, so I wasn't too worried about stomping over an already existing rc.local. With that being said I don't see any reason to not be nice and not overwrite stuff that is already there. Have a couple of comments on the impl, otherwise think this looks good to me. Also nice to add this to the clean-up script. Unrelated note: maybe I should update the clean-up to remove the container conf update lines as well? |
That would be awesome and thank you for the help! |
@acdoussan I removed the need for set fact in the deploy task and validated it works exactly as it should. I also added in resetting the LXC container configs as well, made testing the changes faster so figured may as well knock it out in the same reboot on the cluster teardown. |
Its always the newlines..
We should mirror the deployment task
sorry, couple more thoughts, but appreciate you adding in cleaning up the proxmox conf files! Had one other thought, the |
shebang does have to be the first line, not clear if it matters for |
This is a good catch, yes that technically matters as the bang should be the first line. My first thought would be to break the block up. If rc.local exists this should only add the managed block, but if we are creating a file we can add the shebang. This should be solvable with lineinfile to look for a shebang statement. |
cool cool, let me know if you need any help here making those changes, can always separate things out into separate PRs |
Just noting here that I still have this on my to do list, just haven't been able to check this back out and validate. This is in my list for this week. |
Sounds good, thank you! |
I think we should be good here. I rewrote a lot of how we handle the rc.local file to not blow away an existing file. I also included and validated the lxc configuration and removal extra settings. All of these changes were tested locally and I can confirm they work. I did however find an issue with the implementation, and thats zfs and the overlayfs. I will open an issue on this an look into that. Also added a clean up task that if the rc.local file only has 1 line or less after we removed our modifications, Im assuming its just a shebang line and deleting the file. There could be an edge case here where someone did not setup a rc.local file correctly and has a one liner or didn't have a shebang when they made a custom file. I don't have an answer on a good way to handle this and I would rather clean up our changes. Examples of the rc.local modifications.
An new rc.local file will end up like this:
Edit: I goofed on my code blocks |
Proposed Changes
Checklist
site.yml
playbookreset.yml
playbook