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

fix(topokey): changing topology key to unique name #101

Merged
merged 1 commit into from
Apr 30, 2020

Conversation

pawanpraka1
Copy link
Contributor

@pawanpraka1 pawanpraka1 commented Apr 29, 2020

fixes: #100
depends on :- #94

There are setups where nodename is different than the hostname.
The driver uses the nodename and tries to set the "kubernetes.io/hostname"
node label to the nodename. Which will fail if nodename is not same as
hostname. Here, changing the key to unique name so that the driver can set
that key as node label and also it can not modify/touch the existing node labels.

Now onwards, the driver will use "openebs.io/nodename" key to set the PV node affinity.
Old volumes will have "kubernetes.io/hostname" affinity, and they will also work as
after the PR #94, it supports all the node
labels as topology key and all the nodes have "kubernetes.io/hostname" label set. So
old volumes will work without any issue. Also for the same reason old stoarge classes
which are using "kubernetes.io/hostname" as topology key, will work as that key is supported.

Also Fixes : #47

This fixes the issue where the driver was trying to create the PV on the master node
as master node is having "kubernetes.io/hostname" label, so it is also becoming a valid
candidate for provisioning the PV. After changing the key to unique name, since the driver
will not run on master node, so it will not set "openebs.io/nodename" label to this node
hence this node will never become a valid candidate for the provisioning the volume.

Signed-off-by: Pawan pawan@mayadata.io

@pawanpraka1 pawanpraka1 added bug Something isn't working. Need community involvement Needs community involvement on some action item. labels Apr 29, 2020
@pawanpraka1 pawanpraka1 added this to the v0.7.0 milestone Apr 29, 2020
@pawanpraka1 pawanpraka1 requested a review from kmova April 29, 2020 16:36
@pawanpraka1 pawanpraka1 changed the title fix(topokey): changing topology to unique name fix(topokey): changing topology key to unique name Apr 29, 2020
@pawanpraka1 pawanpraka1 added this to In progress in ZFS Local PV Apr 29, 2020
@pawanpraka1 pawanpraka1 added this to Pre-commits and Designs - Due: Apr 30 2020 in 1.10 Release Tracker - Due May 15th. Apr 29, 2020
@codecov-io
Copy link

Codecov Report

Merging #101 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #101   +/-   ##
=======================================
  Coverage   23.57%   23.57%           
=======================================
  Files          14       14           
  Lines         475      475           
=======================================
  Hits          112      112           
  Misses        362      362           
  Partials        1        1           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c41055...d8faa07. Read the comment docs.

There are setups where nodename is different than the hostname.
The driver uses the nodename and tries to set the "kubernetes.io/hostname"
node label to the nodename. Which will fail if nodename is not same as
hostname. Here, changing the key to unique name so that the driver can set
that key as node label and also it can not modify/touch the existing node labels.

Now onwards, the driver will use "openebs.io/nodename" key to set the PV node affinity.
Old volumes will have "kubernetes.io/hostname" affinity, and they will also work as
after the PR openebs#94, it supports all the node
labels as topology key and all the nodes have "kubernetes.io/hostname" label set. So
old volumes will work without any issue. Also for the same reason old stoarge classes
which are using "kubernetes.io/hostname" as topology key, will work as that key is supported.

This fixes the issue where the driver was trying to create the PV on the master node
as master node is having "kubernetes.io/hostname" label, so it is also becoming a valid
candidate for provisioning the PV. After changing the key to unique name, since the driver
will not run on master node, so it will not set "openebs.io/nodename" label to this node
hence this node will never become a valid candidate for the provisioning the volume.

Signed-off-by: Pawan <pawan@mayadata.io>
@kmova kmova merged commit 49dc997 into openebs:master Apr 30, 2020
ZFS Local PV automation moved this from In progress to Done Apr 30, 2020
1.10 Release Tracker - Due May 15th. automation moved this from Pre-commits and Designs - Due: Apr 30 2020 to Done Apr 30, 2020
@pawanpraka1 pawanpraka1 deleted the key branch April 30, 2020 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. Need community involvement Needs community involvement on some action item.
Projects
ZFS Local PV
  
Done
3 participants