Skip to content

Conversation

@typeid
Copy link
Member

@typeid typeid commented Jan 13, 2026

This PR adds a new command that allows force upgrading ROSA HCP clusters while bypassing OCM pre-flights, utilizing the new upgrade strategy designed in OCM-DDR-0204.

This is an enablement to handling end of support clusters, which require upgrades to new versions regardless of cluster state.

Tested the following:

  • upgrading a single cluster (with/without default service log as well as overriden service log)
  • upgrading a list of clusters (with/without default service log as well as overriden service log)

Code generation assisted by Claude Code.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 13, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: typeid

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 13, 2026
@typeid typeid force-pushed the add-force-upgrading-option branch from b54a236 to bf0df96 Compare January 13, 2026 11:18
Long: `Schedule forced control plane upgrades for ROSA HCP clusters. This command skips all validation checks
(critical alerts, cluster conditions, node pool checks, and version gate agreements).

⚠️ REQUIRES ForceUpgrader PERMISSIONS ⚠️
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we provide some link how to get those?

Copy link
Member Author

@typeid typeid Jan 13, 2026

Choose a reason for hiding this comment

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

This is an internal permission within AMS so I would keep that within private document that in the separate ops-sop SOP (in-flight). Does that make sense to you?

cmd.Flags().BoolVar(&opts.dryRun, "dry-run", false, "Simulate the upgrade without making any changes")

// Service log flags
cmd.Flags().BoolVar(&opts.sendServiceLog, "send-service-log", false, "Send service log notification after scheduling upgrade")
Copy link
Contributor

Choose a reason for hiding this comment

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

I am a bit surprised that we opt to not send a servicelog by default?


// Cluster targeting flags
cmd.Flags().StringVarP(&opts.clusterID, "cluster-id", "C", "", "ID of the target HCP cluster")
cmd.Flags().StringVarP(&opts.clustersFile, "clusters-file", "c", "", "JSON file containing cluster IDs")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should use the same string as the servicelog cluster's file (assuming it's using the same format - which IMO it should):

Read a list of clusters to post the servicelog to. the format of the file is: {"clusters":["$CLUSTERID"]}

}

// validateAndParseClusterFile validates the clusters file and returns the cluster IDs
func (o *forceUpgradeOptions) validateAndParseClusterFile() ([]string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably want to reuse the servicelog clustersfile logic here.

if policy.ScheduleType() == v1.ScheduleTypeAutomatic {
automaticPolicyIDs = append(automaticPolicyIDs, policy.ID())
} else {
return "", fmt.Errorf("existing manual upgrade policy found: target version %s scheduled at %s",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have to make sure the upgrade that is manual will actually go to the new y-stream? If it's just a Z-stream upgrade it would not fix the cluster.

@typeid typeid force-pushed the add-force-upgrading-option branch from e5c3ade to 714cdca Compare January 13, 2026 15:39
@typeid typeid changed the title Feat(SREP-202): Add new hcp forceupgrade command WIP: Feat(SREP-202): Add new hcp forceupgrade command Jan 13, 2026
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 13, 2026
Implements a new forceupgrade command for HCP clusters that allows forcing
cluster upgrades. Includes command structure, implementation, and tests.

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
@typeid typeid force-pushed the add-force-upgrading-option branch from 714cdca to 8eb4afb Compare January 13, 2026 16:04
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 13, 2026

@typeid: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@typeid typeid changed the title WIP: Feat(SREP-202): Add new hcp forceupgrade command Feat(SREP-202): Add new hcp forceupgrade command Jan 13, 2026
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants