Bug 1515194 - override_kernel_check is not recognized by skopeo
Summary: override_kernel_check is not recognized by skopeo
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: skopeo
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Antonio Murdaca
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-20 11:23 UTC by Guohua Ouyang
Modified: 2017-12-10 05:05 UTC (History)
6 users (show)

Fixed In Version: skopeo-0.1.27-1.git93876ac.fc26 skopeo-0.1.27-1.git93876ac.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-09 22:25:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Guohua Ouyang 2017-11-20 11:23:19 UTC
Description of problem:
override_kernel_check in /etc/containers/storage.conf is not recognized by skopeo.
[root@localhost ~]# skopeo copy docker-daemon:docker.io/busybox:latest containers-storage:docker.io/busybox:latest
ERRO[0000] [graphdriver] prior storage driver overlay failed: overlay: Unknown option .override_kernel_check 
FATA[0000] Invalid destination name containers-storage:docker.io/busybox:latest: overlay: Unknown option .override_kernel_check 

Version-Release number of selected component (if applicable):
[root@localhost ~]# rpm -qa | grep skopeo
skopeo-0.1.24-7.gitdd2c3e3.fc27.x86_64
skopeo-containers-0.1.24-7.gitdd2c3e3.fc27.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Antonio Murdaca 2017-11-20 11:31:48 UTC
Could you paste your /etc/containers/storage.conf?

Comment 2 Antonio Murdaca 2017-11-20 11:45:16 UTC
This is a bug in containers/storage where if you don't set the driver in "/etc/containers/storage.conf", the library goes ahead and create wrong options like ".override_kernel_check" instead of "DRIVER_NAME_override_kernel_check".

The issue is in "containers/storage/store.go":

for _, s := range config.Storage.Options.AdditionalImageStores {            
2374         DefaultStoreOptions.GraphDriverOptions = append(DefaultStoreOptions.GraphDriverOptions, fmt.Sprintf("%s.imagestor     e=%s", config.Storage.Driver, s))
2375     }                                                                           
2376     if config.Storage.Options.Size != "" {                                      
2377         DefaultStoreOptions.GraphDriverOptions = append(DefaultStoreOptions.GraphDriverOptions, fmt.Sprintf("%s.size=%s",      config.Storage.Driver, config.Storage.Options.Size))
2378     }                                                                           
2379     if config.Storage.Options.OverrideKernelCheck != "" {                       
2380         DefaultStoreOptions.GraphDriverOptions = append(DefaultStoreOptions.GraphDriverOptions, fmt.Sprintf("%s.override_     kernel_check=%s", config.Storage.Driver, config.Storage.Options.OverrideKernelCheck))
2381     }

it assumes that "config.Storage.Driver" is NOT empty but the config we ship in Fedora actually has an empty graph driver name.

This must be fixed either in c/storage by not sprintf'ing with an empty driver name from the config file or in skopeo pkg by shipping a config with a driver name.

Nalin, could you take this one as it's however a bug in c/storage cause it's not checking for config emptiness when concatenating options?

Comment 3 Antonio Murdaca 2017-11-20 11:45:40 UTC
This is reproducible on latest skopeo master as well

Comment 4 Daniel Walsh 2017-11-20 15:01:27 UTC
Add overlay as the default storage and the problem goes away which is what we have for skopeo-0.1.26-1.git7fd6f66.fc27

I think we should force the user to specify the driver, and not attempt to handle this by default.

Comment 5 Guohua Ouyang 2017-11-21 00:14:46 UTC
(In reply to Antonio Murdaca from comment #1)
> Could you paste your /etc/containers/storage.conf?

# cat /etc/containers/storage.conf 
# storage.conf is the configuration file for all tools
# that share the containers/storage libraries
# See man 5 containers-storage.conf for more information

# The "container storage" table contains all of the server options.
[storage]

# Default Storage Driver
driver = ""

# Temporary storage location
runroot = "/var/run/containers/storage"

# Primary Read/Write location of container storage
graphroot = "/var/lib/containers/storage"

[storage.options]
# AdditionalImageStores is used to pass paths to additional Read/Only image stores
# Must be comma separated list.
additionalimagestores = [
]

# Size is used to set a maximum size of the container image.  Only supported by
# certain container storage drivers.
size = ""

# OverrideKernelCheck tells the driver to ignore kernel checks based on kernel version
override_kernel_check = "true"

Comment 6 Guohua Ouyang 2017-11-21 00:17:55 UTC
set the driver to "overlay" and the problem is gone.

Comment 7 Daniel Walsh 2017-11-21 16:08:29 UTC
A merge of a fixed containers-storage just went into skopeo, which will fix this issue, but I still think we should just hard code overlay as the default to prevent confusion of users.

Comment 8 Fedora Update System 2017-11-25 11:21:41 UTC
skopeo-0.1.27-1.git93876ac.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-dc2053862c

Comment 9 Fedora Update System 2017-11-25 11:22:05 UTC
skopeo-0.1.27-1.git93876ac.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f89a13bb08

Comment 10 Fedora Update System 2017-11-25 21:42:22 UTC
skopeo-0.1.27-1.git93876ac.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-dc2053862c

Comment 11 Fedora Update System 2017-11-25 22:18:01 UTC
skopeo-0.1.27-1.git93876ac.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f89a13bb08

Comment 12 Fedora Update System 2017-12-09 22:25:52 UTC
skopeo-0.1.27-1.git93876ac.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2017-12-10 05:05:37 UTC
skopeo-0.1.27-1.git93876ac.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.