Crc: Error occurred: ssh command error: command : date --date="$(sudo openssl x509 -in /var/lib/kubelet/pki/kubelet-client-current.pem -noout -enddate | cut -d= -f 2)" --iso-8601=seconds

Created on 8 Aug 2019  Â·  11Comments  Â·  Source: code-ready/crc

Though this error message is once mentioned in #367 and therein #363 is mentioned as one possible cause, I think, it's useful to report this separately.

OS: _RHEL 8 (4.18.0-80.4.2.el8_0.x86_64)_
crc version: _0.89.0-alpha-4.1.6+8e9c40e_
bundle: _crc_libvirt_4.1.6.crcbundle.tar.xz_
oc (system+cached): _Client Version: version.Info{Major:"4", Minor:"2+", GitVersion:"v4.2.0", GitCommit:"688e314eb", GitTreeState:"clean", BuildDate:"2019-06-28T10:27:42Z", GoVersion:"go1.12.6", Compiler:"gc", Platform:"linux/amd64"}_

Running as local user (which has been

usermod -aG wheel username
usermod -aG libvirtd username

).

Proceeding like this:

>rm -Rf ~/.crc
>crc setup
INFO Caching oc binary                            
INFO Setting up virtualization                    
INFO Setting up KVM                               
INFO Installing libvirt service and dependencies  
INFO Adding user to libvirt group                 
INFO Enabling libvirt                             
INFO Starting libvirt service                     
INFO Installing crc-driver-libvirt                
INFO Setting up libvirt 'crc' network             
INFO Starting libvirt 'crc' network               
INFO Writing Network Manager config for crc       
INFO Writing dnsmasq config for crc   
>crc start -b /home/username/Downloads/crc_libvirt_4.1.6.crcbundle.tar.xz
INFO Checking if oc binary is cached              
INFO Checking if Virtualization is enabled        
INFO Checking if KVM is enabled                   
INFO Checking if libvirt is installed             
INFO Checking if user is part of libvirt group    
INFO Checking if libvirt is enabled               
INFO Checking if libvirt daemon is running        
INFO Checking if crc-driver-libvirt is installed  
INFO Checking if libvirt 'crc' network is available 
INFO Checking if libvirt 'crc' network is active  
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists 
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists 
? Image pull secret *[...]*
INFO Extracting the crc_libvirt_4.1.6.crcbundle.tar.xz Bundle tarball ... 
INFO Creating VM ...                                                      
INFO Verifying validity of the cluster certificates ... 
ERRO Error occurred: ssh command error:
command : date --date="$(sudo openssl x509 -in /var/lib/kubelet/pki/kubelet-client-current.pem -noout -enddate | cut -d= -f 2)" --iso-8601=seconds
err     : exit status 255
output  :  

Can this problem be manually fixed?
What exactly is the recommended workaround here? Start the VM manually?

crc.log attached.

Most helpful comment

At the moment we haven't decided. Our goal was to not stray away from being
a production-like setup. If we would have something that helps setting up
the cluster, it should be solved as part of OpenShift itself... like as you
said, an operator or operators. This is why the OperatorHub seems to be one
of the options... but so are yaml defintions and ansible scripts? We have
to see this over time and have discussions with the community. Create a new
issue for this specifically perhaps and let's start from there. ;-)

On Thu, Aug 29, 2019 at 2:57 PM Karsten Gresch notifications@github.com
wrote:

This is not something that should be provided OOTB by CRC. This would
rather we a set of scripts you provide yourself or share with the community
;-)

I see, thanks for your response!

Any plans implementing some "well defined" pluggable mechanism, like the
minishift addons? Maybe based on a crc-addon-operator that'd take care
of the installation?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/code-ready/crc/issues/395?email_source=notifications&email_token=AAAAOZVZG7XWZYKYUNR3HPTQG5XPPA5CNFSM4IKL5FH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5NOYVQ#issuecomment-526052438,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAAOZS2X3FFBVAAJKMWC2LQG5XPPANCNFSM4IKL5FHQ
.

--

Gerard Braad | http://gbraad.nl
[ Doing Open Source Matters ]

All 11 comments

@karstengresch This is happening because the ssh command failed, as it takes some time for the VM to get started, that's why the fix, added a retry logic. You can use this release which has that commit in.

@anjannath Thanks for the hint and the patched file.

Tried it (a bit - too? - late I guess) and get

INFO Extracting the crc_libvirt_4.1.6.crcbundle.tar.xz Bundle tarball ... 
INFO Creating VM ...                              
INFO Verifying validity of the cluster certificates ... 
ERRO Error occurred: Temporary Error: ssh command error:
command : date --date="$(sudo openssl x509 -in /var/lib/kubelet/pki/kubelet-client-current.pem -noout -enddate | cut -d= -f 2)" --iso-8601=seconds
err     : exit status 255
output  : 
Temporary Error: ssh command error:
command : date --date="$(sudo openssl x509 -in /var/lib/kubelet/pki/kubelet-client-current.pem -noout -enddate | cut -d= -f 2)" --iso-8601=seconds
err     : exit status 255
output  : 
Temporary Error: ssh command error:
command : date --date="$(sudo openssl x509 -in /var/lib/kubelet/pki/kubelet-client-current.pem -noout -enddate | cut -d= -f 2)" --iso-8601=seconds
err     : exit status 255
output  : 
Temporary Error: ssh command error:
command : date --date="$(sudo openssl x509 -in /var/lib/kubelet/pki/kubelet-client-current.pem -noout -enddate | cut -d= -f 2)" --iso-8601=seconds
err     : exit status 255
output  :  

crc.log (new one) attached.

NB - I did all the steps from above before (e.g. added my local user to wheel and libvirt group as it got lost after a reboot, deleted ~./crc recursively, removed the crc domain with virsh, ran crc setup and called crc start as above.

@karstengresch We had another check been added, to check if ssh is available before actually checking the cert dates, can you please try out the latest release, and use crc setup to setup the environment, and crc start to launch the cluster, no need to manually configure.
https://github.com/code-ready/crc/releases/tag/1.0.0-beta.3

@anjannath - Thanks your reply!

can you please try out the latest release

This is actually what I already did since the early morning and 1.0.0-beta.3 is running like a charme!
No hickups, except of missing user confusion which I gladly could solve with this article: https://suraj.pro/post/user-on-os4/

Thanks for your support!

Ohh, we already have an user added developer with password developer apart from the already existing kubeadmin user, this needs to be documented though!

We added a developer user ... Can you verify?

On Wed, Aug 28, 2019, 18:47 Karsten Gresch notifications@github.com wrote:

@anjannath https://github.com/anjannath - Thanks your reply!

can you please try out the latest release

This is actually what I already did since the early morning and
1.0.0-beta.3 is running like a charme!
No hickups, except of missing user confusion which I gladly could solve
with this article: https://suraj.pro/post/user-on-os4/

Thanks for your support!

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/code-ready/crc/issues/395?email_source=notifications&email_token=AAAAOZUQOTXPZBVMDQEO4TLQGZJT7A5CNFSM4IKL5FH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5KWHUY#issuecomment-525689811,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAAOZUW5WMQWFNAAAJJ5MTQGZJT7ANCNFSM4IKL5FHQ
.

@anjannath @gbraad Thanks for asking and your interest!

We added a developer user ... Can you verify?

Yes, user developer is provided w/in the _htpasswd_provider_ and working. Fun fact: If you setup another provider w/ the same credentials, this doesn't seem to confuse anything (just wondering if I could setup multiple p/w for the same user).

Anyway, would be great if the developer login information got printed out to the console after crc start, just like in _minishift_.

Even better - for my cases - would be a fully set up RH SSO where I easily could setup users via the Keycloak console.

Even better would be a fully set up RH SSO where I easily could setup users via the Keycloak console.

This is not something that should be provided OOTB by CRC. This would rather we a set of scripts you provide yourself or share with the community ;-)

Anyway, would be great if the developer login information got printed out to the console after crc start, just like in minishift.

it was a last minute fix to the image and wasn't directly intended for the beta. We are however going to document it ... and decide what else can be done.

This is not something that should be provided OOTB by CRC. This would rather we a set of scripts you provide yourself or share with the community ;-)

I see, thanks for your response!

Any plans implementing some "well defined" pluggable mechanism, like the minishift addons? Maybe based on a _crc-addon-operator_ that'd take care of the installation?

At the moment we haven't decided. Our goal was to not stray away from being
a production-like setup. If we would have something that helps setting up
the cluster, it should be solved as part of OpenShift itself... like as you
said, an operator or operators. This is why the OperatorHub seems to be one
of the options... but so are yaml defintions and ansible scripts? We have
to see this over time and have discussions with the community. Create a new
issue for this specifically perhaps and let's start from there. ;-)

On Thu, Aug 29, 2019 at 2:57 PM Karsten Gresch notifications@github.com
wrote:

This is not something that should be provided OOTB by CRC. This would
rather we a set of scripts you provide yourself or share with the community
;-)

I see, thanks for your response!

Any plans implementing some "well defined" pluggable mechanism, like the
minishift addons? Maybe based on a crc-addon-operator that'd take care
of the installation?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/code-ready/crc/issues/395?email_source=notifications&email_token=AAAAOZVZG7XWZYKYUNR3HPTQG5XPPA5CNFSM4IKL5FH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5NOYVQ#issuecomment-526052438,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAAOZS2X3FFBVAAJKMWC2LQG5XPPANCNFSM4IKL5FHQ
.

--

Gerard Braad | http://gbraad.nl
[ Doing Open Source Matters ]

Was this page helpful?
0 / 5 - 0 ratings