-
Notifications
You must be signed in to change notification settings - Fork 1.4k
openstack: update the machine templates #1042
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
Conversation
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.
Thanks for doing this!
I've added a few more things that we need to add to get the actuator to create the workers. These are all things I've had to add in my env before the workers could be created.
@@ -47,8 +47,7 @@ spec: | |||
value: | |||
apiVersion: openstack.cluster.k8s.io/v1alpha1 | |||
kind: OpenStackMachineProviderConfig | |||
image: | |||
id: {{.Image}} | |||
image: {{.Image}} |
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.
We also need all of these (using my own hardcoded values):
cloudName: standalone
cloudsSecret: openstack-creds
networks:
- uuid: c24f8bc2-4d8b-4ab3-a6ed-1be816113bf6
placement:
region: regionOne
securityGroups:
- worker
subnet: worker
And basically the same thing for the master template.
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.
I knew I was forgetting something. Will update
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.
From your comment, I'm guessing that using tags didn't work for you. Right?
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.
In what way? If you mean for worker deletion, than no they didn't.
Btw thanks for the update. As far as I can see, it's still missing the networks
array and fixing up the subnet
name and securityGroups
. Will you add those as well please? I've had to fix all three of them in my testing.
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.
@tomassedovic sorry, I meant for filtering subnets, networks, and securityGroups. The keys exist in the template but I'm assuming that the tag filter didn't work for you.
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.
@flaper87 ah yes, sorry.
You're correct: the filters did not work. The actuator kept complaining that it could not be deserialised properly and that it expected a string (or an array of strings for SG).
As far as I can see, this is the validation it uses:
(or at least something consistent with those expectations)
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.
@tomassedovic right, that's what I thought. I think this should be fixed in the actuator CRD since we've added support for filters already: https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/master/pkg/cloud/openstack/clients/machineservice.go#L255
What do you think about getting this patch in as is and check these filters one by one in the actuator?
7522525
to
0a9aa5a
Compare
value: "{{$value}}" | ||
- name: "tag:{{$key}}" | ||
values: | ||
- "{{$value}}" |
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.
I'm getting:
I0111 12:13:56.221433 1 controller.go:114] Running reconcile Machine for ostest-worker-8rwch
E0111 12:13:56.225632 1 controller.go:160] Error checking existence of machine instance for machine object ostest-worker-8rwch; error unmarshaling JSON: while decoding JSON: json: cannot unmarshal object into Go struct field OpenstackProviderSpec.networks of type []v1alpha1.NetworkParam
I think this is because networks expects an array of filter
objects.
Something like this got my actuator to create the VMs:
networks:
- filter:
tag: openshiftClusterID=9a6f0a69-3033-4adb-8e7a-91c8f4b75665
That instance is stuck in ERROR, but I think that may be unrelated (altohugh maybe this syntax isn't fully right either).
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.
oh, ok. So, I failed at defining the filter. Lemme fix that
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.
actually, did you check it had the right network attached?
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.
It did not. Which may have been the ERROR I was seeing. But my environment was busted for unrelated reasons, so I can't tell for sure if that was it.
I'm running it from scratch again now.
/test e2e-aws |
@flaper87 let me paste the exact diff. Yours is still a little off:
So for each tag we create a |
@tomassedovic I think there was a small race between your comment and my latest push 😄 The current PS should match what you expect to have for the filters field. |
Note that we're passing a version for kubelet, which the openstack actuator checks on. This version, however, is completely ignored by the CoreOS image. We'll work on removing this requirement from the openstack actuator but, in the meantime, we should just set it to something to avoid breaking.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flaper87, tomassedovic 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 |
/test e2e-aws |
Note that we're passing a version for kubelet, which the openstack
actuator checks on. This version, however, is completely ignored by the
CoreOS image. We'll work on removing this requirement from the openstack
actuator but, in the meantime, we should just set it to something to
avoid breaking.