feat: improve talos upgrade command - #12751
Conversation
|
This PR is stale because it has been open 45 days with no activity. |
778fda8 to
8940a40
Compare
8940a40 to
a2f6b9d
Compare
6963da1 to
ded09cf
Compare
|
@smira , Might be a little late to the party Per Node Image Resolution involves
As a basic criteria new flags created
|
…per-node image resolution for building upgrade url
|
Dropping in test upgrade logs I wanted to test out if I do a upgrade to certain version and schematic and on next say just version upgrade it should pick up the new changed schematic rather than the one during the startup, I was not able to try this out because |
|
|
||
| // If every derived component is set explicitly, no per-node state is needed: the image is uniform. | ||
| if upgradeCmdFlags.schematic != "" && upgradeCmdFlags.platform != "" && | ||
| upgradeCmdFlags.secureBootChanged && upgradeCmdFlags.factoryChanged && upgradeCmdFlags.talosVersion != ""{ |
There was a problem hiding this comment.
We can maybe remove this talosversion check as well to get a quick image url ref, as version will remain same for all nodes from tag AFAIK
ded09cf to
d9593ec
Compare
| // machine was installed from an Image Factory image, so its absence is not an error. | ||
| schematic, err := safe.StateGetByID[*runtimeres.ImageFactorySchematic](ctx, c.COSI, runtimeres.ImageFactorySchematicID) | ||
| if err != nil { | ||
| if state.IsNotFoundError(err) || status.Code(err) == codes.PermissionDenied { |
There was a problem hiding this comment.
On older Talos versions (< 1.14) this resource type doesn't exist at all, so the API returns PermissionDenied rather than NotFound.
Pull Request
Resolves #12152
What? (description)
--imageparameter, keep as legacy--factory, --platform,--secureBoot,--schematicWhy? (reasoning)
--imagewith component-based flags that create image url from machine state / specified requirements and validate secure-boot/platform transitions.Acceptance
Please use the following checklist:
make conformance)make fmt)make lint)make docs)make unit-tests)Trying this out on a test node:
Post upgrade check extensions & upgraded version