Skip to content
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

Worker MachineTemplates are missing worker labels #531

Closed
teoyaomiqui opened this issue Apr 26, 2021 · 4 comments
Closed

Worker MachineTemplates are missing worker labels #531

teoyaomiqui opened this issue Apr 26, 2021 · 4 comments
Assignees
Labels
2-Manifests Relates to manifest/document set related issues bug Something isn't working priority/critical Items critical to be implemented, usually by the next release size s
Milestone

Comments

@teoyaomiqui
Copy link
Contributor

Describe the bug
Worker MachineTemplates missing labels to target workers:

https://github.com/airshipit/airshipctl/blob/master/manifests/site/test-site/target/workers/provision/metal3machinetemplate.yaml

Steps To Reproduce
Add multiple BMH hosts and add scale Worker MachineDeployment to more than one

Expected behavior
Only workers with appropriate label to be selected for the machines

Actual behavior
Cluster-API selects random BMH hosts for the k8s nodes.

Suggested solution

  1. Change machine template to target nodes by worker label:
    spec:
      hostSelector:
        matchLabels:
          airshipit.org/k8s-role: worker
  1. Modify BMH hosts generator to be label aware, add variables to specify labels per host in here:
    https://github.com/airshipit/airshipctl/blob/master/manifests/function/hostgenerator-m3/hosttemplate.yaml#L44
@teoyaomiqui teoyaomiqui added bug Something isn't working triage Needs evaluation by project members labels Apr 26, 2021
@airshipbot
Copy link

airshipbot commented Apr 26, 2021

Related Change #786811

Subject: Add worker labels for the machine deployments
Link: https://review.opendev.org/c/airship/airshipctl/+/786811
Status: MERGED
Owner: Kostyantyn Kalynovskyi ([email protected])

Approvals

Code-Review
+2 Matt McEuen
+1 Andrii Ostapenko
+2 Drew Walters
+1 Vladislav Kuzmin
Verified
+1 ATT Airship2.0 CI
+2 Zuul
Workflow
+1 Kostyantyn Kalynovskyi

Last Updated: 2021-05-17 12:59:54 CDT

@jezogwza jezogwza added priority/critical Items critical to be implemented, usually by the next release and removed triage Needs evaluation by project members labels Apr 28, 2021
@jezogwza jezogwza added this to the v2.1 milestone Apr 28, 2021
@jezogwza jezogwza added the 2-Manifests Relates to manifest/document set related issues label Apr 28, 2021
@teoyaomiqui teoyaomiqui self-assigned this May 3, 2021
airshipbot pushed a commit that referenced this issue May 17, 2021
We are missing worker labels and this may lead to
future problems when we will want to scale, wrong nodes
can be chosen for the worker MachineDeployments.

This is a temporary solution to add this to kustomize
Permanent solution should add labels to host generation
and variable catalogue.

Relates-To: #531

Change-Id: Ia07f1d9125bf5b6aadea3750ea53bc34228577ca
@jessegler
Copy link

I'm seeing a similar issue in Treasuremap, where if I render the machine template, the worker label is still missing.

@teoyaomiqui
Copy link
Contributor Author

@jessegler Could you add a little more information about this? What is the site you are working on in TM also which phase are you rendering?

I am quite sure that the issue in TM will be solved as soon as we uplift airshipctl to the version that functionalizes worker provisioning here https://review.opendev.org/c/airship/airshipctl/+/778931

@jessegler
Copy link

@teoyaomiqui I looked into this a little more and found the root cause of what I'm seeing. manifests/site/test-site/target/workers/provision/kustomize.yaml isn't inheriting from airshipctl but rather sets the resources directly -- including the machine template.

It looks like that patchset should fix it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2-Manifests Relates to manifest/document set related issues bug Something isn't working priority/critical Items critical to be implemented, usually by the next release size s
Projects
None yet
Development

No branches or pull requests

4 participants