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

Let users use custom images (other ocp version, with customization) #718

Open
cardil opened this issue Oct 14, 2019 · 11 comments
Open

Let users use custom images (other ocp version, with customization) #718

cardil opened this issue Oct 14, 2019 · 11 comments
Labels
kind/enhancement New feature or request points/1 priority/minor status/pinned Prevents the stale bot from closing the issue

Comments

@cardil
Copy link

cardil commented Oct 14, 2019

General information

  • OS: Linux / macOS / Windows
  • Hypervisor: KVM / Hyper-V / VirtualBox / hyperkit

CRC version

version: 1.0.0-rc.0+34371d3
OpenShift version: 4.2.0-0.nightly-2019-09-26-192831 (embedded in binary)

CRC status

CRC VM:          Stopped
OpenShift:       Stopped
Disk Usage:      0B of 0B (Inside the CRC VM)
Cache Usage:     30.94GB
Cache Directory: /home/ksuszynski/.crc/cache

CRC config

- cpus                                  : 6
- memory                                : 10240

Host Operating System

NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Steps to reproduce

  1. Build other image, with https://github.com/code-ready/snc or other tool
  2. Invoke crc start --bundle ~/.crc/crc_libvirt_4.1.19.crcbundle
  3. Error occurs and CRC won't boot cluster.

Expected

There should be some flag that let user run custom image that he is providing. Like --accept-unsupported. With that flag crc should warn user but should continue booting:

$ crc start --bundle ~/.crc/crc_libvirt_4.1.19.crcbundle --accept-unsupported
WARN Running unsupported custom build image of version 4.1.19. This release of CRC is only tested with 4.2.0-0.nightly-2019-09-26-192831 version!
INFO Checking if running as non-root
INFO Checking if oc binary is cached
...

Without giving this flag CRC should stop:

$ crc start --bundle ~/.crc/crc_libvirt_4.1.19.crcbundle
ERRO crc_libvirt_4.1.19.crcbundle is not supported by this CRC release, you should use crc_<hypervisor>_4.2.0-0.nightly-2019-09-26-192831.crcbundle. To accept unsupported bundle use --accept-unsupported flag.

Actual

Unskippable error stops operation:

ERRO Error occurred: crc_libvirt_4.1.14.crcbundle bundle is not supported by this binary, you must use crc_<hypervisor>_4.2.0-0.nightly-2019-09-26-192831.crcbundle
@gbraad
Copy link
Contributor

gbraad commented Oct 14, 2019

This is at the moment not allowed to prevent unnecessary error reports from unsupported bundles. This might change soon after the GA.

Likely an option like -f (or --force will be used for this, but this hasn't ben decided.

@gbraad
Copy link
Contributor

gbraad commented Oct 14, 2019

Also notice the error:

ERRO Error occurred: crc_libvirt_4.1.14.crcbundle bundle is not supported by this binary, you must use crc_<hypervisor>_4.2.0-0.nightly-2019-09-26-192831.crcbundle

Have you incluced the needed <hypervisor> and matched the name of the original bundle name? (workaround, but NOT supported by us)

@cardil
Copy link
Author

cardil commented Oct 14, 2019

Likely an option like -f (or --force will be used for this, but this hasn't ben decided.

Yes. This proposition is directly for a force flag - to let users experiment if they would like to. Either --force or --accept-unsupported.

@praveenkumar
Copy link
Member

@cardil at the moment you can build the crc also with change in the Bundle version https://github.com/code-ready/crc/blob/master/Makefile#L15 and then use -b as per your requirement but long term would be like @gbraad suggested.

@gbraad
Copy link
Contributor

gbraad commented Oct 14, 2019

Let's keep this issue open for future reference. The need to recompile CRC 9as bundle name is enforced) and/or allow an override is needed in future.

However, for GA we will not support this just yet.

@cfergeau
Copy link
Contributor

I'm routinely applying the patch below on my testing builds, so I'd definitely have a use for such a flag ;)

commit a3cc24955f11dca0c906263d7cf7ae0fe7e305e4
Author: Christophe Fergeau <[email protected]>
Date:   Wed Aug 28 16:05:23 2019 +0200

    Add CRC_DEBUG_NO_BUNDLE_VERSION_CHECK env var

diff --git a/pkg/crc/validation/validation.go b/pkg/crc/validation/validation.go
index b8c88583..f7b4f3c1 100644
--- a/pkg/crc/validation/validation.go
+++ b/pkg/crc/validation/validation.go
@@ -49,6 +49,11 @@ func ValidateBundle(bundle string) error {
                        return errors.Newf("You must provide the path to a valid bundle using the -b option")
                }
        }
+
+       if os.Getenv("CRC_DEBUG_NO_BUNDLE_VERSION_CHECK") != "" {
+               return nil
+       }
+
        // Check if the version of the bundle provided by user is same as what is released with crc.
        releaseBundleVersion := version.GetBundleVersion()
        userProvidedBundleVersion := filepath.Base(bundle)

@gbraad
Copy link
Contributor

gbraad commented Oct 14, 2019

LOL

@stale
Copy link

stale bot commented Feb 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/stale Issue went stale; did not receive attention or no reply from the OP label Feb 11, 2020
@cardil
Copy link
Author

cardil commented Feb 11, 2020

On devconf cz I asked, and I received answer that something like this issue is on roadmap. If so, it should not be closed.

@stale stale bot removed the status/stale Issue went stale; did not receive attention or no reply from the OP label Feb 11, 2020
@stale
Copy link

stale bot commented Apr 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/stale Issue went stale; did not receive attention or no reply from the OP label Apr 11, 2020
@stale stale bot closed this as completed Apr 25, 2020
@cfergeau cfergeau reopened this Apr 25, 2020
@stale stale bot removed the status/stale Issue went stale; did not receive attention or no reply from the OP label Apr 25, 2020
@cfergeau cfergeau added the status/pinned Prevents the stale bot from closing the issue label Apr 25, 2020
@guillaumerose
Copy link
Contributor

guillaumerose commented Oct 7, 2020

If you build crc from the source and don't embbed a bundle, a warning will only be displayed. Any bundle can be used.

See #1535

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request points/1 priority/minor status/pinned Prevents the stale bot from closing the issue
Projects
None yet
Development

No branches or pull requests

5 participants