-
Notifications
You must be signed in to change notification settings - Fork 55
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
[WIP] Bind mount the log dir instead of using a symlink #318
Conversation
Using a symlink to the log directory leads to a dirty git tree, if we add a log/.keep and also touch /var/log/manageiq/.keep we can bind mount the /var/log/manageiq directory without dirtying the git status and also remove the issues with not having a log/ directory in any of the repos necessitating a bin/setup script to get tests to run.
Will this cause an issue when we try to mount a new volume on the appliance? That's the only other place I feel like we might need to consider. |
Hm in that case there isn't already a var_log logical volume? In the upstream appliance build the log volume is precreated
I'm thinking the way to deal with this generally is to create a systemd mount unit that evmserverd would depend on so that it always gets mounted before starts, that way appliance console can setup the log disk after the system image is created. That way we don't have to modify |
Checked commit agrare@cd0e473 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Yeah, if you use the option I think you end up with an unused volume upstream. I don't actually recall how it works downstream ... @simaishi do we also ship with a volume for the logs there or do we expect people to provide something for that? As for fstab the configuration in the console updates that at runtime here https://github.com/ManageIQ/manageiq-appliance_console/blob/master/lib/manageiq/appliance_console/logical_volume_management.rb#L81 |
Just like upstream, we ship downstream with a volume. |
Should appliance-console be adding the disk to the vg_system volume group then vg_resize && lv_resize then? |
Probably, but I think that's a separate thing, right @agrare? While it would definitely be an improvement I don't think it will help with the git status thing you're trying to solve, right? |
Oh correct it wouldn't fix the |
Yeah, but I'm not even sure what's going on with that option as it is.... Seems like the whole thing needs to be rethought either way. |
😱 I think it would mount it on top of what log is symlinked to (/var/log/manageiq) |
Yup that's what it does, so you'd have something like
|
Well at least we're not throwing away the rest of the space in the filesystem created for |
Yeah I don't think that was intentional, also it would mount over any existing logs that were there from before creating that disk so they wouldn't be visible nor would they ever be rotated/purged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for addressing this
@@ -20,8 +20,8 @@ ln -vs $vmdb_root $manageiq_root | |||
|
|||
# Replace the log directory with the larger logvol | |||
mkdir -p /var/log/manageiq | |||
rm -rf $vmdb_root/log | |||
ln -vs /var/log/manageiq $vmdb_root/log | |||
touch /var/log/manageiq/.keep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the mount much better. can we drop the touch
though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh - looks like .keep
is back in the repo.
The current PR works for me.
This pull request has been automatically closed because it has not been updated for at least 6 months. Feel free to reopen this pull request if these changes are still valid. Thank you for all your contributions! |
Using a symlink to the log directory leads to a dirty git tree, if we
add a log/.keep and also touch /var/log/manageiq/.keep we can bind mount
the /var/log/manageiq directory without dirtying the git status and also
remove the issues with not having a log/ directory in any of the repos
necessitating a bin/setup script to get tests to run.
TODO: