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

snap_package resource gives requires classic confinement error #9099

Open
kapilchouhan99 opened this issue Nov 15, 2019 · 1 comment
Open

snap_package resource gives requires classic confinement error #9099

kapilchouhan99 opened this issue Nov 15, 2019 · 1 comment

Comments

@kapilchouhan99
Copy link
Contributor

@kapilchouhan99 kapilchouhan99 commented Nov 15, 2019

Description

snap_package resource gives requires classic confinement error

Chef Version

Chef Infra Client: 15.2.20

Platform Version

Ubuntu 19.04

Replication Case

snap_package 'install package' do
  package_name      ["kubectl"]
end

Client Output

Facing this error:

[2019-11-15T15:01:51+05:30] FATAL: RuntimeError: snap_package[install package] ((chef-apply cookbook)::(chef-apply recipe) line 39) had an error: RuntimeError: status: Bad Request, kind: snap-needs-classic, message: snap "kubectl" requires classic confinement

After I have passed classic as a option, but getting the same error:

snap_package 'install package' do
  package_name      ["kubectl"]
  options           ["classic"]
end
[2019-11-15T15:05:43+05:30] FATAL: RuntimeError: snap_package[install package] ((chef-apply cookbook)::(chef-apply recipe) line 39) had an error: RuntimeError: status: Bad Request, kind: snap-needs-classic, message: snap "kubectl" requires classic confinement

Stacktrace

@kapilchouhan99

This comment has been minimized.

Copy link
Contributor Author

@kapilchouhan99 kapilchouhan99 commented Nov 19, 2019

As per my analysis, I think requires classic confinement issue is not from chef but from snapd side. I have verified it with the curl command:

sudo curl --unix-socket /run/snapd.socket -H "Content-Type: application/json" -X POST -d '{"action": "install", "snaps": ["kubectl"], "classic": true}' http://localhost/v2/snaps | jq .

After running this command, facing the same error:

{
  "type": "error",
  "status-code": 400,
  "status": "Bad Request",
  "result": {
    "message": "snap \"kubectl\" requires classic confinement",
    "kind": "snap-needs-classic",
    "value": "kubectl"
  }
}

Have added topic https://forum.snapcraft.io/t/facing-requires-classic-confinement-error/14163 and report a bug https://bugs.launchpad.net/snappy/+bug/1853122 regarding the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.