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

Improve instructions on what to do when the image bundle has expired #631

Closed
ghost opened this issue Sep 23, 2019 · 9 comments
Closed

Improve instructions on what to do when the image bundle has expired #631

ghost opened this issue Sep 23, 2019 · 9 comments
Assignees

Comments

@ghost
Copy link

ghost commented Sep 23, 2019

General information

  • OS: Linux
  • Hypervisor: KVM
  • Did you run crc setup before starting it (Yes)?

CRC version

version: 1.0.0-beta.3-4.1.11+e97bf65

CRC status

version: 1.0.0-beta.3-4.1.11+e97bf65

CRC config

- bundle                             : /home/roto/.crc/crc_libvirt_4.1.11.crcbundle
- cpus                               : 4
- memory                             : 8192
- nameserver                         : 
- pull-secret-file                   : 
- skip-check-user-in-libvirt-group   : true
- vm-driver                          : libvirt
- warn-check-bundle-cached           : true

Host Operating System

# PRETTY_NAME="Fedora 30 (Workstation Edition)"

Steps to reproduce

crc stop
CodeReady Containers instance stopped
crc setup
INFO Checking if NetworkManager is installed      
INFO Checking if NetworkManager service is running 
INFO Caching oc binary                            
INFO Setting up virtualization                    
INFO Setting up KVM                               
INFO Installing libvirt service and dependencies  
INFO Adding user to libvirt group                 
WARN Skipping above check ...                     
INFO Enabling libvirt                             
INFO Starting libvirt service                     
INFO Installing crc-driver-libvirt                
INFO Removing older system-wide 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               
INFO Unpacking bundle from the CRC binary    
crc start
INFO Checking if NetworkManager is installed      
INFO Checking if NetworkManager service is running 
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    
WARN Skipping above check ...                     
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 
INFO Checking if CRC bundle is cached in '$HOME/.crc' 
INFO Loading bundle: crc_libvirt_4.1.11.crcbundle ... 
INFO Creating VM ...                              
INFO Verifying validity of the cluster certificates ... 
ERRO Error occurred: Certs have expired, they were valid till: 23 Sep 19 12:25 +0000
crc start
INFO Checking if NetworkManager is installed      
INFO Checking if NetworkManager service is running 
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    
WARN Skipping above check ...                     
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 
INFO Checking if CRC bundle is cached in '$HOME/.crc' 
INFO Loading bundle: crc_libvirt_4.1.11.crcbundle ... 
INFO Creating VM ...                              
INFO Verifying validity of the cluster certificates ... 
ERRO Error occurred: Certs have expired, they were valid till: 23 Sep 19 12:25 +0000

Expected

CRC VM: Running

Actual

ERRO Error occurred: Certs have expired, they were valid till: 23 Sep 19 12:25 +0000

Logs

INFO Verifying validity of the cluster certificates ... 
(crc) Calling .GetSSHHostname
(crc) DBG | GetIP called for crc
(crc) DBG | Getting current state...
(crc) DBG | IP address: 192.168.130.11
(crc) Calling .GetSSHPort
(crc) Calling .GetSSHKeyPath
(crc) Calling .GetSSHKeyPath
(crc) Calling .GetSSHUsername
Using SSH client type: external
Using SSH private key: /home/roto/.crc/cache/crc_libvirt_4.1.11/id_rsa_crc (-r--------)
&{[-F /dev/null -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none -o LogLevel=quiet -o PasswordAuthentication=no -o ServerAliveInterval=60 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null core@192.168.130.11 -o IdentitiesOnly=yes -i /home/roto/.crc/cache/crc_libvirt_4.1.11/id_rsa_crc -p 22] /usr/bin/ssh <nil>}
About to run SSH command:
date --date="$(sudo openssl x509 -in /var/lib/kubelet/pki/kubelet-client-current.pem -noout -enddate | cut -d= -f 2)" --iso-8601=seconds
SSH cmd err, output: <nil>: 2019-09-23T12:25:56+00:00

ERRO Error occurred: Certs have expired, they were valid till: 23 Sep 19 12:25 +0000 
Making call to close driver server
@ghost ghost added the kind/bug Something isn't working label Sep 23, 2019
@adrielparedes
Copy link

adrielparedes commented Sep 23, 2019

I tried to delete the whole .crc directory and same result (osx version: 1.0.0-beta.5)

@niboj
Copy link

niboj commented Sep 24, 2019

I had the same problem on Fedora 30.
Here's what I did to make it work again...

`[phil@localhost bin]$ crc start
INFO Checking if NetworkManager is installed
INFO Checking if NetworkManager service is running
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
INFO Checking if CRC bundle is cached in '$HOME/.crc'
INFO Starting stopped VM ...
INFO Verifying validity of the cluster certificates ...
ERRO Error occurred: Certs have expired, they were valid till: 23 Sep 19 12:25 +0000
[phil@localhost bin]$ cd ..
[phil@localhost ~]$ cd .crc
[phil@localhost .crc]$ cd cache
[phil@localhost cache]$ dir
crc_libvirt_4.1.11 pullsecret.json
[phil@localhost cache]$ rm -rf *
[phil@localhost cache]$ crc stop
Stopping CodeReady Containers instance... this may take a few minutes
CodeReady Containers instance stopped
[phil@localhost cache]$ crc start
ERRO Error occurred: File /home/phil/.crc/crc_libvirt_4.1.14.crcbundle does not exist
ERRO Error occurred: Run 'crc setup' to unpack the bundle to disk
[phil@localhost cache]$ crc setup
INFO Checking if running as non-root
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 Removing older system-wide crc-driver-libvirt
INFO Setting up libvirt 'crc' network
INFO Starting libvirt 'crc' network
INFO Checking if NetworkManager is installed
INFO Checking if NetworkManager service is running
INFO Writing Network Manager config for crc
INFO Writing dnsmasq config for crc
INFO Will use root access: write dnsmasq configuration in /etc/NetworkManager/dnsmasq.d/crc.conf
[sudo] Mot de passe de phil : 
INFO Will use root access: execute systemctl daemon-reload command
INFO Will use root access: execute systemctl stop/start command
INFO Unpacking bundle from the CRC binary
Setup is complete, you can now run 'crc start' to start a CodeReady Containers instance
[phil@localhost cache]$ crc start
INFO Checking if running as non-root
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 NetworkManager is installed
INFO Checking if NetworkManager service is running
INFO Checking if /etc/NetworkManager/conf.d/crc-nm-dnsmasq.conf exists
INFO Checking if /etc/NetworkManager/dnsmasq.d/crc.conf exists
ERRO Error occurred: Could not find cached bundle info
[phil@localhost cache]$ crc delete
CodeReady Containers instance deleted
[phil@localhost cache]$ crc start
INFO Checking if running as non-root
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 NetworkManager is installed
INFO Checking if NetworkManager service is running
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 [? for help] *

ERRO Error occurred: invalid pull secret: invalid character 'y' looking for beginning of value
ERRO Error occurred: Failed to get pull secret: invalid pull secret: invalid character 'y' looking for beginning of value
[phil@localhost cache]$ crc start
INFO Checking if running as non-root
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 NetworkManager is installed
INFO Checking if NetworkManager service is running
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 [? for help] ******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************

INFO Extracting bundle: crc_libvirt_4.1.14.crcbundle ...
INFO Creating VM ...
INFO Verifying validity of the cluster certificates ...
INFO Check internal and public dns query ...
INFO Copying kubeconfig file to instance dir ...
INFO Adding user's pull secret and cluster ID ...

INFO Starting OpenShift cluster ... [waiting 3m]
INFO
INFO To access the cluster, first set up your environment by following 'crc oc-env' instructions
INFO Then you can access it by running 'oc login -u developer -p developer https://api.crc.testing:6443'
INFO To login as an admin, username is 'kubeadmin' and password is BMLkR-NjA28-v7exC-8bwAk
INFO
INFO These credentials can also be used to access the OpenShift web console at https://console-openshift-console.apps-crc.testing
CodeReady Containers instance is running
[phil@localhost cache]$
[phil@localhost cache]$ crc console
Opening the OpenShift Web console in the default browser...
[phil@localhost cache]$
`

@anjannath anjannath removed the kind/bug Something isn't working label Sep 24, 2019
@anjannath
Copy link
Member

This is not a bug in crc, the included system bundle has certs which are valid only for 30 days, and the error message says the same thing, At the moment you'll have to download a newer version of crc.

The original issue is tracked in #11

@gbraad
Copy link
Contributor

gbraad commented Sep 24, 2019

ERRO Error occurred: Certs have expired, they were valid till: 23 Sep 19 12:25 +0000

This might sound better when we also provide a solution to the user on how to progress from here/solve this; like Update your cluster image bundle by downloading a new version from http://mirror.openshift.com/...

@gbraad gbraad added the resolution/invalid This doesn't seem right label Sep 24, 2019
@gbraad
Copy link
Contributor

gbraad commented Sep 24, 2019

Adding the invalid tag for the original issue; as I believe we have an issue for the updated message.

@gbraad gbraad changed the title [BUG] - ERRO Error occurred: Certs have expired, they were valid till: $NOW Improve instructions on what to do when the image bundle has expired Sep 24, 2019
@gbraad gbraad added kind/enhancement New feature or request priority/critical size/S and removed resolution/invalid This doesn't seem right labels Sep 24, 2019
@cfergeau cfergeau self-assigned this Sep 24, 2019
@ghost
Copy link
Author

ghost commented Sep 24, 2019

After delete $HOME/.crc dir, and setup/start again, the error it's the same.

@cfergeau
Copy link
Contributor

Have you downloaded an updated crc version?

@ghost
Copy link
Author

ghost commented Sep 24, 2019

Am on it, based in your doc/README enhance,
And yes, after update crc version, life is beautiful again.
Thanks.

@ghost ghost closed this as completed Sep 24, 2019
@gbraad
Copy link
Contributor

gbraad commented Sep 24, 2019

Duplicate of #593

@gbraad gbraad marked this as a duplicate of #593 Sep 24, 2019
praveenkumar added a commit that referenced this issue Sep 26, 2019
We have detail about it in the doc troubleshoot section but not
in the readme, better to have it here also.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants