Ubuntu OSMorphing Refactor#427
Conversation
| minimum=lts_release, maximum=lts_release): | ||
| return True | ||
| _, subversion = detected_os_info['release_version'].split('.', 1) | ||
| if not subversion.startswith("04"): |
There was a problem hiding this comment.
Not all *.04 releases are LTS, for example 25.04 is not a LTS release. You may want to check if the major version is an even number.
There was a problem hiding this comment.
Very good catch, thank you!
| LOG.warning( | ||
| "Detected Ubuntu release version " | ||
| f"'{detected_os_info['release_version']}' is not an LTS one. " | ||
| "Coriolis only supports morphing Ubuntu LTS versions.") |
There was a problem hiding this comment.
So we're completely dropping support for non-LTS Ubuntu releases (at the moment it accepts non-LTS versions newer than 22.04).
That's reasonable, however let's clearly state it in the PR message.
This patch makes sure that the base Ubuntu osmorphing tool checks
for the migrated machine's subversion, and makes sure that it's an
LTS subversion, instead of checking each LTS version separately.
As it's stated now, it implies that we're rewriting the version check, not that we're completely dropping support for non-LTS releases. Simply saying This patch drops os-morphing support for non-LTS Ubuntu releases. would be much clearer.
There was a problem hiding this comment.
We never officially supported non-LTS versions, see the old code, it literally just went through the list of LTS versions (at the time), and otherwise it refused to use any kind of other ubuntu release (if you consider the provider code as well).
Anyway, I'll clarify the PR and commit messages. Thank you!
There was a problem hiding this comment.
Interesting. The current code checks if it's a LTS version. If it isn't, then it checks if it's newer than 22.04. Unless I'm mistaken, 22.10 would be reported as "supported.
This made me believe that we had the policy of supporting recent non-LTS releases.
There was a problem hiding this comment.
At least at the base level maybe it was an attempt at future-proofing, but the providers had specific supported versions, and they all had tools for LTS versions only.
We're trying to future-proof both the core and provider tools with these additions.
New cloud-init version (>26) changed its systemd unit service name, therefore the enablement method needs to reflect that.
This patch drops OSMorphing support for any non-LTS Ubuntu release. This will allow for provider-side refactoring and tool grouping.
Replaced them with stacked `@classmethod\n@abc.abstractmethod`
This PR contains the following patches:
Fix new cloud-init version service enablement.
New cloud-init version (>26) changed its systemd unit service name,
therefore the enablement method needs to reflect that.
Improve upon Ubuntu OSMorphing tool check
This patch drops OSMorphing support for any non-LTS Ubuntu release.
This will allow for provider-side refactoring and tool grouping.
Replace all deprecated
@abc.abstractclassmethoddeclarationsReplaced them with stacked
@classmethod\n@abc.abstractmethod