Allow setting the lease expiry for DHCP#599
Conversation
This was added to metal3-dev-env in [0]. Expose the setting for dev-scripts too. 0: metal3-io/metal3-dev-env#599
|
/test-integration |
|
I triggered test-integration which may confirm - but do we know what libvirt version is expected in the supported Ubuntu release? |
| {% set hostname = hostname_format % num %} | ||
| <host mac='{{ node_mac_map.get(ironic_name).get(item.name)}}' name='{{hostname}}' ip='{{item.dhcp_range_v4[0]|ipmath(ns.index|int)}}'/> | ||
| <host mac='{{ node_mac_map.get(ironic_name).get(item.name)}}' name='{{hostname}}' ip='{{item.dhcp_range_v4[0]|ipmath(ns.index|int)}}'> | ||
| <lease expiry='{{ item.lease_expiry }}'/> |
There was a problem hiding this comment.
Should this be conditional on item.lease_expiry being defined?
There was a problem hiding this comment.
I added a default for lease_expiry so it should always be set.
Description above says we need libvirt 6.3.0+. I just checked from the CI, and Ubuntu 20.04 based CI shows that we have 6.0.0 version, which is installed here. I'm wondering if we can install 7.0.0 version on Ubuntu by specifying the version explicitly(UPDATED) during installation. |
cybertron
left a comment
There was a problem hiding this comment.
I've been using this locally for a while now and have noticed a couple of odd things with the advanced-virtualization version of libvirt. Neither prevent use of it, but I'm wondering if we don't want to force installation of the newer version and just document what version of libvirt is needed for this particular feature? That would save us from having to deal with the distro-specific methods of getting the correct version.
| {% set hostname = hostname_format % num %} | ||
| <host mac='{{ node_mac_map.get(ironic_name).get(item.name)}}' name='{{hostname}}' ip='{{item.dhcp_range_v4[0]|ipmath(ns.index|int)}}'/> | ||
| <host mac='{{ node_mac_map.get(ironic_name).get(item.name)}}' name='{{hostname}}' ip='{{item.dhcp_range_v4[0]|ipmath(ns.index|int)}}'> | ||
| <lease expiry='{{ item.lease_expiry }}'/> |
There was a problem hiding this comment.
I added a default for lease_expiry so it should always be set.
|
Could you please elaborate on the use case you are trying to cover ? as is now, there would not be any choice from the user point of view (except if the user is using the roles directly, not via the high level scripts). Would it make sense to introduce a configuration variable and pass it to ansible ? |
|
I'm looking to support setting infinite leases from dev-scripts. I have a patch up that makes use of this configuration: openshift-metal3/dev-scripts#1191 I'm not sure how broadly applicable this is. It's for an OpenShift feature that does some special handling of infinite leases, which I think is a little unusual. If you think others might want to use it I can wire something in though. |
|
If it is openshift specific, then maybe it should not be added here |
|
OpenShift is based on metal3 though. Without this we can't use metal3-dev-env to do development and testing. |
|
@cybertron IIRC this is actually testing a feature of NetworkManager, so it's not specific to OpenShift (although the requirement originated there)? @maelk the dev-scripts repo has some dependencies on metal3-dev-env, specifically |
Note that |
Newer versions of libvirt (6.3.0 and up) allow the lease expiry to be set for hosts. We have some functionality that depends on using infinite leases, so we would like to be able to set this through metal3-dev-env.
520534b to
f7bd923
Compare
|
I've removed the requirements part entirely. I'm not sure we should be forcing people to pull in a newer version of libvirt if they don't need it. Older releases of libvirt will just drop the lease configuration, and anyone who wants to use custom lease expirations can make sure they have the necessary libvirt themselves. That way it's a conscious choice, not something that might come as a surprise. |
|
/test-integration |
|
/lgtm |
|
Hmm, the centos job seems to have gotten stuck. /test-centos-integration |
|
Hi @cybertron seems there was a glitch in CI by that time, re-triggering all tests once again since we have had changes recently to run integration tests. /test-centos-integration |
Thanks, I've been meaning to ask about this. Looks like it's still working! |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hardys The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This was added to metal3-dev-env in [0]. Expose the setting for dev-scripts too. 0: metal3-io/metal3-dev-env#599
This was added to metal3-dev-env in [0]. Expose the setting for dev-scripts too. 0: metal3-io/metal3-dev-env#599
* Support lease expiry option This was added to metal3-dev-env in [0]. Expose the setting for dev-scripts too. 0: metal3-io/metal3-dev-env#599 * Bump to current metal3-dev-env
Newer versions of libvirt (6.3.0 and up) allow the lease expiry to
be set for hosts. We have some functionality that depends on using
infinite leases, so we would like to be able to set this through
metal3-dev-env.