Start a Conversation

Solved!

Go to Solution

2023

July 14th, 2020 07:00

Failed to install CSI 1.2.0 driver for Unity

Experts,

I'm trying to install CSI 1.2.0 on centOS k8s cluster, but failed. From the controller pod, seems there's authentication issue. Could you please share any idea on this?

 

Here's my secret.json file:

[root@master helm]# cat secret.json
{
"storageArrayList": [
{
"username": " ",
"password": " ",
"restGateway": " >",
"arrayId": "APM00194717505",
"insecure": true,
"isDefaultArray": true
}
]
}

root@master helm]# kubectl logs unity-controller-0 -c driver -n unity
Endpoint /var/run/csi/csi.sock
time="2020-07-14T09:58:21Z" level=debug msg="enabled context injector"
time="2020-07-14T09:58:21Z" level=debug msg="init req & rep validation" withSpec=false
time="2020-07-14T09:58:21Z" level=debug msg="init implicit req validation" withSpecReq=false
time="2020-07-14T09:58:21Z" level=debug msg="init req validation" withSpecReq=true
time="2020-07-14T09:58:21Z" level=debug msg="enabled request ID injector"
time="2020-07-14T09:58:21Z" level=debug msg="enabled request logging"
time="2020-07-14T09:58:21Z" level=debug msg="enabled response logging"
time="2020-07-14T09:58:21Z" level=debug msg="enabled spec validator opt: request validation"
time="2020-07-14T09:58:21Z" level=debug msg="enabled serial volume access"
time="2020-07-14T09:58:21Z" level=info runid=start msg="Driver Mode:controller" func="github.com/dell/csi-unity/service.(*service).BeforeServe()" file="dell/csi-unity/service/service.go:146"
time="2020-07-14T09:58:21Z" level=info runid=config-0 msg="*************Synchronizing driver config**************" func="github.com/dell/csi-unity/service.(*service).syncDriverConfig()" file="dell/csi-unity/service/service.go:366"
csi-unity logger initiated. This should be called only once.
time="2020-07-14T09:58:21Z" level=debug runid=config-0 msg="unity client init" func="github.com/dell/gounity.NewClientWithArgs()" file="dell/gounity@v1.2.0/unityclient.go:160"
time="2020-07-14T09:58:21Z" level=info msg="configured csi-unity.dellemc.com" ArrayId=apm00194717505 Insecure=true IsDefaultArray=true RestGateway="https://10.241.167.210" password="*******" username="YWRtaW4="
time="2020-07-14T09:58:21Z" level=info runid=config-0 msg="configured csi-unity.dellemc.com" func="github.com/dell/csi-unity/service.(*service).BeforeServe.func1()" file="dell/csi-unity/service/service.go:141"
time="2020-07-14T09:58:21Z" level=info msg="identity service registered"
time="2020-07-14T09:58:21Z" level=info msg="controller service registered"
time="2020-07-14T09:58:21Z" level=info msg=serving endpoint="unix:///var/run/csi/csi.sock"
time="2020-07-14T09:58:21Z" level=info runid=config-1 msg="Dynamic config load goroutine invoked" func="github.com/dell/csi-unity/service.(*service).loadDynamicConfig()" file="dell/csi-unity/service/service.go:305"
time="2020-07-14T09:58:21Z" level=debug runid=config-1 msg="Config folder:/unity-config" func="github.com/dell/csi-unity/service.(*service).loadDynamicConfig()" file="dell/csi-unity/service/service.go:310"
time="2020-07-14T09:58:22Z" level=debug msg="/csi.v1.Identity/Probe: REQ 0001: XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"
time="2020-07-14T09:58:22Z" level=info runid=1 msg="Executing Probe with args: {XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0}" func="github.com/dell/csi-unity/service.(*service).Probe()" file="dell/csi-unity/service/identity.go:15"
time="2020-07-14T09:58:22Z" level=debug runid=1 msg="Inside Controller Probe" func="github.com/dell/csi-unity/service.(*service).probe()" file="dell/csi-unity/service/service.go:636"
time="2020-07-14T09:58:22Z" level=debug runid=1 msg="Probing all arrays" func="github.com/dell/csi-unity/service.(*service).probe()" file="dell/csi-unity/service/service.go:642"
time="2020-07-14T09:58:22Z" level=debug arrayid=apm00194717505 runid=1 msg="Executing Authenticate REST client" func="github.com/dell/gounity.(*Client).Authenticate()" file="dell/gounity@v1.2.0/unityclient.go:50"
time="2020-07-14T09:58:22Z" level=debug msg="/csi.v1.Identity/Probe: REQ 0002: XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"
time="2020-07-14T09:58:22Z" level=info runid=2 msg="Executing Probe with args: {XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0}" func="github.com/dell/csi-unity/service.(*service).Probe()" file="dell/csi-unity/service/identity.go:15"
time="2020-07-14T09:58:22Z" level=debug runid=2 msg="Inside Controller Probe" func="github.com/dell/csi-unity/service.(*service).probe()" file="dell/csi-unity/service/service.go:636"
time="2020-07-14T09:58:22Z" level=debug runid=2 msg="Probing all arrays" func="github.com/dell/csi-unity/service.(*service).probe()" file="dell/csi-unity/service/service.go:642"
time="2020-07-14T09:58:22Z" level=debug arrayid=apm00194717505 runid=2 msg="Executing Authenticate REST client" func="github.com/dell/gounity.(*Client).Authenticate()" file="dell/gounity@v1.2.0/unityclient.go:50"
time="2020-07-14T09:58:22Z" level=debug msg="/csi.v1.Identity/GetPluginInfo: REQ 0003: XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"
time="2020-07-14T09:58:22Z" level=debug msg="/csi.v1.Identity/GetPluginInfo: REP 0003: Name=csi-unity.dellemc.com, VendorVersion=1.2.0, Manifest=map[commit:09d1b128bc40de6a0dd24157402b35535cb03693 formed:Wed, 24 Jun 2020 12:51:48 UTC semver:1.2.0 url:http://github.com/dell/csi-unity], XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"
time="2020-07-14T09:58:22Z" level=debug msg="/csi.v1.Identity/Probe: REQ 0004: XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"
time="2020-07-14T09:58:22Z" level=info runid=4 msg="Executing Probe with args: {XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0}" func="github.com/dell/csi-unity/service.(*service).Probe()" file="dell/csi-unity/service/identity.go:15"
time="2020-07-14T09:58:22Z" level=debug runid=4 msg="Inside Controller Probe" func="github.com/dell/csi-unity/service.(*service).probe()" file="dell/csi-unity/service/service.go:636"
time="2020-07-14T09:58:22Z" level=debug runid=4 msg="Probing all arrays" func="github.com/dell/csi-unity/service.(*service).probe()" file="dell/csi-unity/service/service.go:642"
time="2020-07-14T09:58:22Z" level=debug arrayid=apm00194717505 runid=4 msg="Executing Authenticate REST client" func="github.com/dell/gounity.(*Client).Authenticate()" file="dell/gounity@v1.2.0/unityclient.go:50"
time="2020-07-14T09:58:23Z" level=debug arrayid=apm00194717505 runid=1 msg="Response code:401 for url: /api/types/loginSessionInfo" func="github.com/dell/gounity/api.(*client).DoAndGetResponseBody()" file="dell/gounity@v1.2.0/api/restclient.go:290"
time="2020-07-14T09:58:23Z" level=debug arrayid=apm00194717505 runid=1 msg="Authentication response code: 401" func="github.com/dell/gounity.(*Client).Authenticate()" file="dell/gounity@v1.2.0/unityclient.go:64"
time="2020-07-14T09:58:23Z" level=debug msg="/csi.v1.Identity/Probe: REP 0001: rpc error: code = FailedPrecondition desc = runid=1 All unity arrays are not working. Could not proceed further"

 

I don't understand why I'm getting this response code 401, which is referring to unauthorized. As per the product guide, I've specified the "insecure=true":

"

The storageArrayList[i].insecure parameter set to true by default, and the driver does not verify the Unisphere certificates.

"

 

2 Intern

 • 

166 Posts

July 15th, 2020 05:00

Hi,

The documentation is ambiguous (I already opened a ticket for that), you should not encode your credential in base64 but let them in plain-text like the rest of the configuration.

 

The installer will encode in base64 the entire secret.json file.

 

Let us know if that works.

 

 

1 Rookie

 • 

72 Posts

July 14th, 2020 10:00

Hi,

The "insecure" setting on the CSI driver has to do with whether or not the driver will accept invalid certificates (e.g. self-signed) from the Unity array.

The driver seems to be able to reach the array fine, but the error that you are getting back is for an authorization failure.  You may want to check that password to make sure it is still valid and base64 encoded properly.  Perhaps try to login to the Unisphere UI or directly to the REST API to see if that works.

Thanks
Bryan

23 Posts

July 14th, 2020 16:00

Hi Byran,

Thanks for your replying.

I've firstly verified the user/password, as per the product guide, I'm using below cmd, and I feel it could be small chance i pasted it wrong.

echo -n "user"|base64

echo -n "user"|base64

 

And actually, from above log messages, decode username="YWRtaW4=", it's "admin", which is correct. So, I bet the password is also correct. The problem is I dont see it's saying message about incorrect username/password, while I'm using incorrect ones I will get below:

 

[root@master helm]# cat secret.json
{
"storageArrayList": [
{
"username": "YWRtaW4=",
"password": "143033",
"restGateway": "https://10.241.167.210",
"arrayId": "APM00194717505",
"insecure": true,
"isDefaultArray": true
}
]
}

 

[root@master helm]# kubectl create secret generic unity-creds -n unity --from-file=config=secret.json
secret/unity-creds created

 

[root@master ~]# kubectl logs unity-controller-0 -c driver -n unity|grep runid=1
time="2020-07-14T23:34:32Z" level=info runid=1 msg="Executing Probe with args: {XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0}" func="github.com/dell/csi-unity/service.(*service).Probe()" file="dell/csi-unity/service/identity.go:15"
time="2020-07-14T23:34:32Z" level=debug runid=1 msg="Inside Controller Probe" func="github.com/dell/csi-unity/service.(*service).probe()" file="dell/csi-unity/service/service.go:636"
time="2020-07-14T23:34:32Z" level=debug runid=1 msg="Probing all arrays" func="github.com/dell/csi-unity/service.(*service).probe()" file="dell/csi-unity/service/service.go:642"
time="2020-07-14T23:34:32Z" level=debug arrayid=apm00194717505 runid=1 msg="Executing Authenticate REST client" func="github.com/dell/gounity.(*Client).Authenticate()" file="dell/gounity@v1.2.0/unityclient.go:50"
time="2020-07-14T23:34:34Z" level=debug arrayid=apm00194717505 runid=1 msg="Response code:401 for url: /api/types/loginSessionInfo" func="github.com/dell/gounity/api.(*client).DoAndGetResponseBody()" file="dell/gounity@v1.2.0/api/restclient.go:290"
time="2020-07-14T23:34:34Z" level=debug arrayid=apm00194717505 runid=1 msg="Authentication response code: 401" func="github.com/dell/gounity.(*Client).Authenticate()" file="dell/gounity@v1.2.0/unityclient.go:64"
time="2020-07-14T23:34:34Z" level=debug msg="/csi.v1.Identity/Probe: REP 0001: rpc error: code = FailedPrecondition desc = runid=1 All unity arrays are not working. Could not proceed further"

 

It's the same response code. However, I'm not sure what I'm doing, but I modified the "restGateway", then recreate secret with above wrong password, and reinstalled CSI, I'm able to get response code 200 from authentication:

 

time="2020-07-14T23:39:45Z" level=info msg="configured csi-unity.dellemc.com" ArrayId=apm00194717505 Insecure=true IsDefaultArray=true RestGateway="https://10.241.167.210/index.html" password="*******" username="YWRtaW4="

 

...

 

[root@master ~]# kubectl logs unity-controller-0 -c driver -n unity|grep runid=1
time="2020-07-14T23:39:45Z" level=info runid=1 msg="Executing Probe with args: {XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0}" func="github.com/dell/csi-unity/service.(*service).Probe()" file="dell/csi-unity/service/identity.go:15"
time="2020-07-14T23:39:45Z" level=debug runid=1 msg="Inside Controller Probe" func="github.com/dell/csi-unity/service.(*service).probe()" file="dell/csi-unity/service/service.go:636"
time="2020-07-14T23:39:45Z" level=debug runid=1 msg="Probing all arrays" func="github.com/dell/csi-unity/service.(*service).probe()" file="dell/csi-unity/service/service.go:642"
time="2020-07-14T23:39:45Z" level=debug arrayid=apm00194717505 runid=1 msg="Executing Authenticate REST client" func="github.com/dell/gounity.(*Client).Authenticate()" file="dell/gounity@v1.2.0/unityclient.go:50"
time="2020-07-14T23:39:46Z" level=debug arrayid=apm00194717505 runid=1 msg="Response code:200 for url: /api/types/loginSessionInfo" func="github.com/dell/gounity/api.(*client).DoAndGetResponseBody()" file="dell/gounity@v1.2.0/api/restclient.go:290"
time="2020-07-14T23:39:46Z" level=debug arrayid=apm00194717505 runid=1 msg="Authentication response code: 200" func="github.com/dell/gounity.(*Client).Authenticate()" file="dell/gounity@v1.2.0/unityclient.go:64"
time="2020-07-14T23:39:46Z" level=debug arrayid=apm00194717505 runid=1 msg="Authentication successful" func="github.com/dell/gounity.(*Client).Authenticate()" file="dell/gounity@v1.2.0/unityclient.go:74"
time="2020-07-14T23:39:46Z" level=debug arrayid=apm00194717505 runid=1 msg="Controller Probe Success" func="github.com/dell/csi-unity/service.singleArrayProbe()" file="dell/csi-unity/service/service.go:627"
time="2020-07-14T23:39:46Z" level=info runid=1 msg="Controller Probe Success" func="github.com/dell/csi-unity/service.(*service).probe()" file="dell/csi-unity/service/service.go:655"

 

So, from above I think the initial authentication issue was not related the username/password.

23 Posts

July 16th, 2020 17:00

You are genius! It's working now, and I can continue my test.

FYI, when I was working on v1.1.0, I was able to install the CSI by specifying the username/password encoded in base64 in myvalue file. Reading a few online doc regarding the secret, it should support the base64 encode, isnt it? Looks like it's the CSI code bug.

Again, thanks for your great help on this.

No Events found!

Top