-
Notifications
You must be signed in to change notification settings - Fork 30
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
No need to restart the VM if the config was not updated #82
Conversation
This looks good to me - I would just add that this change enables usage of the 1st case (both setup_minishift and start_minishift set to true), and only in that case is the minishift stop skipped - meaning that this doesn't affect running the contra-env-setup with the default options (the 2nd case), except for the better check for the host-passthrough option. |
|
||
- name: Wait for the cluster to come up completely | ||
- name: "Check if <cpu mode=host-passthrough/> is already set" |
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.
Would it be better to put these tasks in a block that only has the 1 linux check vs having that check 4 separate times?
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.
Yes, that sounds reasonable. Will fix it.
In order to apply the cpu mode="host-passthrough" config to the VM, one needs to stop the VM first. That was the case before, every time. However, at least on Fedora, the cpu mode="host-passthrough" is configured by default and thus there is no need to actually update the config and then restart the VM. This considerably speeds up the the process. Note about the setup_minishift and start_minishift flag values - there are four possible cases: 1) 'setup_minishift == true and start_minishift == true' --- this will result in creating and initializing brand new minishift profile, which will be running after the init is done. 2) 'setup_minishift == true and start_minishift == false' --- this will result in creating and initializing brand new minishift profile, but it will be stopped at the end (as start_minishift == false). It may well be started again by e.g. the os_temps role which usually comes after the minishift role. 3) 'setup_minishift == false and start_minishift == true' --- this won't initialize (create) the VM at all. The VM is expected to be created before running contra-env-setup. The VM will, however, be started at the end (in case it's not already running). 4) 'setup_minishift == false and start_minishift == false' --- this won't do minishift operations at all. This combination is useful for deploying into remote OpenShift clusters.
118bca7
to
38e9528
Compare
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.
LGTM
In order to apply the cpu mode="host-passthrough" config to the VM, one needs
to stop the VM first. That was the case before, every time. However, at
least on Fedora, the cpu mode="host-passthrough" is configured by
default and thus there is no need to actually update the config and then
restart the VM. This considerably speeds up the the process.
Note about the setup_minishift and start_minishift flag values - there
are four possible cases:
'setup_minishift == true and start_minishift == true' --- this will
result in creating and initializing brand new minishift profile, which
will be running after the init is done.
'setup_minishift == true and start_minishift == false' --- this will
result in creating and initializing brand new minishift profile,
but it will be stopped at the end (as start_minishift == false).
It may well be started again by e.g. the os_temps role which
usually comes after the minishift role.
'setup_minishift == false and start_minishift == true' --- this
won't initialize (create) the VM at all. The VM is expected to be
created before running contra-env-setup. The VM will, however, be
started at the end (in case it's not already running).
'setup_minishift == false and start_minishift == false' --- this
won't do minishift operations at all. This combination is useful
for deploying into remote OpenShift clusters.