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
Custom deploy procedure support #156
Custom deploy procedure support #156
Conversation
/assign @dtantsur |
/retest |
1 similar comment
/retest |
pkg/apis/baremetal/v1alpha1/baremetalmachineproviderspec_types.go
Outdated
Show resolved
Hide resolved
I wonder if we need to update CAPM3 in a similar way... |
/retest |
2 similar comments
/retest |
/retest |
Update Dockerfile Keep Dockerfile.rhel
/retest |
/test e2e-metal-ipi-virtualmedia |
The virtualmedia job has never passed so I'm wondering if there's a real issue - in the latest run I noticed BMO was failing to start due to a port conflict, but that doesn't seem to be related to this change so retesting to confirm if that's repeatable |
@kirankt: The following test failed, say
Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
At least some tests have passed, so it's not necessarily a problem with this patch. |
@@ -552,17 +554,23 @@ func (a *Actuator) provisionHost(ctx context.Context, host *bmh.BareMetalHost, | |||
config *bmv1alpha1.BareMetalMachineProviderSpec) error { | |||
originalHost := host.DeepCopy() | |||
|
|||
// We only want to update the image setting if the host does not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing this is potentially breaking as it will cause re-deploys on upgrade. Maybe skip everything if host.Spec.Image != nil || host.Spec.CustomDeploy != nil
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment was at best out of date and at worst nonsense. Kiran was right to delete it.
Hosts that are already provisioned/ing are not going to be selected anyway, so we will never get to this point.
// IsValid returns an error if the object is not valid, otherwise nil. The | ||
// string representation of the error is suitable for human consumption. | ||
func (s *BareMetalMachineProviderSpec) IsValid() error { | ||
missing := []string{} | ||
if s.Image.URL == "" { | ||
if s.CustomDeploy.Method == "" && s.Image.URL == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
if s.CustomDeploy.Method == "" {
return nil
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH, I think the whole IsValid
function is now defunct. I thought about removing it since Image.URL/Checksum are now optional unlike before.
I don't think the failure is relate but I did notice that BMO was failing a few times in my test failing to bind to 9440 which is the liveness probe port for both BMO and CAPBM. Not sure why they are the same. My best guess is that when these two competing pods end up scheduled on the same control plane host, BMO fails because its the last to start.
|
That's only a problem if CAPBM is also running with --net=host. I can't think of a reason it should, but maybe it does? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@@ -552,17 +554,23 @@ func (a *Actuator) provisionHost(ctx context.Context, host *bmh.BareMetalHost, | |||
config *bmv1alpha1.BareMetalMachineProviderSpec) error { | |||
originalHost := host.DeepCopy() | |||
|
|||
// We only want to update the image setting if the host does not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment was at best out of date and at worst nonsense. Kiran was right to delete it.
Hosts that are already provisioned/ing are not going to be selected anyway, so we will never get to this point.
missing = append(missing, "Image.URL") | ||
} | ||
if s.Image.Checksum == "" { | ||
if s.CustomDeploy.Method == "" && s.Image.Checksum == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arguably we should always check for a checksum when there is an image, not just if there is no custom deploy method. But for now there's no difference.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kirankt, zaneb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I checked and AFAICT it doesn't, but maybe something else does and uses the same default port. |
You are right, but there are processes on master-0 that use ports 9440 and 9441 and AFAIK, only MAO and the its providers use these ports for healtz. I haven't been able to definitely locate the process/pod that runs on 9440, so I assumed it was CAPBM.. As long as CBO gets scheduled to the other control plane nodes, it works. |
Add support for custom-deploy procedure. See:
metal3-io/baremetal-operator#884