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

Updating example oVirt cloud-init template #17869

Merged
merged 1 commit into from
Aug 17, 2018

Conversation

jan-zmeskal
Copy link
Contributor

This PR was created because I think that example Customization Template that is provided for cloud-init provisioning on oVirt does not work as expected. Here are my points:

  • The original version modifies connection called eth0, but if you provision e.g. RHEL7 VM, the default connection for eth device is called System eth0. My PR takes this into account and should work with any eth connection
  • Also, the original code did not take into account user's choice of Address Mode. I suppose that when user chooses Address Mode to be Static, they want to disable DHCP address obtaining.

@jan-zmeskal jan-zmeskal force-pushed the updated_ovirt_ci_template branch from 1049b4c to 32f7445 Compare August 16, 2018 14:19
@jan-zmeskal jan-zmeskal changed the title [WIP] Updating example oVirt cloud-init template Updating example oVirt cloud-init template Aug 16, 2018
@miq-bot
Copy link
Member

miq-bot commented Aug 16, 2018

Checked commit jan-zmeskal@32f7445 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 👍

- nmcli connection modify eth0
- ETH_CON=$(nmcli --get-values name connection show | grep "eth")
- nmcli connection down "$ETH_CON"
- nmcli connection modify "$ETH_CON"
ip4 <%= evm[:ip_addr] %>/<%= evm[:subnet_mask] %>
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to avoid setting the rest of these ip4 attributes if it's marked as dhcp?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bdunne I also thought about this but I am not sure. Because you might want to assign static IP to to a VM and still want to get one from DHCP. Those two options actually work together if you go for Address Mode == DHCP.

Copy link
Member

Choose a reason for hiding this comment

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

Currently in our dialogs these fields are only visible if you select "static", right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bdunne No, they are visible no matter which Address Mode is selected. If they were visible only with "static" Address Mode selected, then your original proposal would be without doubt the right way to go.

@bdunne bdunne merged commit 596d334 into ManageIQ:master Aug 17, 2018
@bdunne bdunne self-assigned this Aug 17, 2018
@bdunne bdunne added this to the Sprint 93 Ending Aug 27, 2018 milestone Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants