-
Notifications
You must be signed in to change notification settings - Fork 32
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/disconnect volume #29
Fix/disconnect volume #29
Conversation
2b2b08d
to
04852eb
Compare
9074942
to
de0f8d9
Compare
Thanks @paullaffitte 👍 , in a highlevel, the proposed code looks good to me, however havent tested this manually and verified myself on various code path changes. I am inclined to take this PR in though |
/lgtm |
/hold |
TargetIqn: *iqn, | ||
// List of portals must be >= 1 (>1 signals multipath/mpio) | ||
TargetPortals: tgtp, | ||
// List of targets must be >= 1 (>1 signals multipath/mpio) |
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.
if we have just one item in the targets
can we consider it as "multipath" enabled share ? previously the decision was based on portals
which always true and point us that its a multipath share.
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.
With the current changes, there is a function Connector.IsMultipathEnabled
that returns true if Connector.MountTargetDevice.Type == "mpath"
. So it doesn't depends on how many targets we have but on the fact that the devices is actually handled by multipathd or not. This information is retrieved through lsblk
.
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 like the changes proposed, but if at all possible, it would be great to not add new dependencies on host binaries such as lsblk and blockdev. Each new dependency makes it more challenging to support older OS releases. I wish I could tell customers to upgrade to the latest tool versions, but this is often very challenging in some manufacturing or highly secure environments.
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 also found a few issues with the current https://github.com/kubernetes-csi/csi-lib-iscsi version, as I tested under a few different operating systems (Ubuntu, CentOS, RHEL), so my interest is to either work with the Enix PR changes or submit a PR here to address some small changes to handle multipath with iSCSI storage arrays.
One test case of interest, is testing these PR changes with multipathd.conf using 'user_friendly_names: "yes"' as I experienced issues when a customer was using this setting.
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.
@jskazinski indeed very valuable points, it differently behaved for me as well with different distros.. Regarding user_friendly_names
its indeed a good test to have.
Just a general update here, we ( + @paullaffitte ) are having discussions on this PR to get this library in a good shape. Some of the fixes which I have made at my end conflict with this PR, but the plan is to get all the fixes in place for consumers to work correctly. Will update once we have all the fixes in place. |
[status update] We had a discussion on this PR ( @paullaffitte ) and beyond, the plan is to make sure the exported functions are not breaking while we fix other issues in this library as in this PR. This PR will be refreshed keeping backward compatibility is maintained and consumers are not broken. Once confirmed, we will get this PR in and start consuming in csi iscsi driver...etc. |
@paullaffitte any luck with the bit of refactoring of this PR based on above comments ? |
@humblec, I just pushed a commit that should remove breaking changes from the point of view of csi-driver-iscsi. I will continue to address comments above and try to make those changes ready in the course of next week. |
Thanks @paullaffitte 👍
That would be awesome, so that I can refresh my patches for iscsi driver and be ready for a release of the same. |
@paullaffitte can you please list down whats pending in this PR wrt to the comments or discussions we had so far? asking it explictly as this is a big PR with many changes. |
@humblec Sure, here is a list of changes present in this PR:
After our discussions, those changes have been added too:
Feel free to ask if you need more details on some points. |
This was one of the bug which we want to get rid of for some time , thanks 👍
Indeed good to have.
Good 👍
👍
I am not sure I got it completely, can you please share some more details on this?
This is one area we have to revisit later, the reason being, if user has set
ooc, in which scenarios the discovery could be success but rescan fail?
This was the very important one and thanks for making sure we are not regressing any more 👍
Yep, good to have !
Helps in all extents.
Just a couple of clarifications as mentioned above. |
@paullaffitte one final comment on this PR, that said, it would be appreciated if you can squash/group the commits which cover the functionalities and tests together , atm there are 50 commits which I think that, bit overly segregated and make it difficult to review or pick a specific change in a workflow manner. Appreciated if you can squash and refresh. Please let me know if you need any help on this.. Thanks for the great work 👍 |
- fix example/main.go - add go.mod to simplify local development
- include error code - remove unused properties - retrieve specific columns including device size - always output as JSON
1c519ba
to
b0ce999
Compare
I applied the requested changes, there is just one point to clarify #29 (comment). |
debug.Printf("Couldn't find dm-* path for path: %s, found non dm-* path: %s", path, devicePath) | ||
return "", fmt.Errorf("couldn't find dm-* path for path: %s, found non dm-* path: %s", path, devicePath) | ||
|
||
if multipathDevice.Type != "mpath" { |
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.
@paullaffitte it is good to have a tracker issue to check how this code block in effect if user_friendly_names
is enabled in a multipath system. We can also add a todo here so that we wont forget to keep track of it.
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 think it will be better to have an issue for this as it make it more visible.
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 posted an issue about it: #32
This version looks good to me 👍 , I have one minor comment to have a tracker for @j-griffith @jsafrane @msau42 @xing-yang requesting your review too. |
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.
Other than the defaults on those flags being removed and hte conversation you have going regarding the introduction of lsblk I'm LGTM
I don't think my comment around the flag defaults is crticial or needs to be done to merge this, but I am confused on where you're landing on the lsblk question.
password = flag.String("password", "eJBDC7Bt7WE3XFDq", "") | ||
lun = flag.Int("lun", 1, "") | ||
debug = flag.Bool("debug", false, "enable logging") | ||
portals = flag.String("portals", "192.168.1.112:3260", "Comma delimited. Eg: 1.1.1.1,2.2.2.2") |
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.
At some point all these defaults should be removed and we should a mandatory check that the flags are set. These dfaults are nice for an example but they won't mean anything to to someone that's not using the openstack test setup I had 3 years ago :)
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.
sure @j-griffith , I will get this cleared while working on some other optimization on this. Opening a tracker issue for this as well.
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.
#33 tracks this.
Thanks @j-griffith 👍 , for now, we will stick with the current version of lsblk raw format parsing to support few versions of |
With all recent changes, csi-driver-iscsi seems to still work properly. I just noted that there still is one breaking change: |
@paullaffitte thanks for retesting it with latest refresh version of this patch. Regarding the |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: j-griffith, paullaffitte 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 |
[Update] Considering this has gone through good amount of testing and review ( also an existing approval) so far, lets get this in. If at all any alarm for the breakage side, we will release a version of this library with a fix accordingly. Thanks @paullaffitte @j-griffith @jskazinski for the contribution and discussions on this. 👍 |
/lgtm |
/unhold |
@humblec Do you have a release date in mind? Maybe just an estimation? Thanks @humblec @j-griffith and @jskazinski for your collaboration! |
We are targetting a release around kube 1.23 release @paullaffitte .. |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This PR fix some stability issues related to multipathd by adding multiple consistency checks and prevent filesystem corruption. It also adds a lot of tests.
Which issue(s) this PR fixes:
Special notes for your reviewer:
This code is already being used in production by enix/san-iscsi-csi and Seagate/seagate-exos-x-csi.
Does this PR introduce a user-facing change?: