Facing requires classic confinement error

Bug #1853122 reported by kapil chouhan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Fix Released
Undecided
Unassigned

Bug Description

As per the documentation, https://github.com/snapcore/snapd/wiki/REST-API#post-v2snaps
I am trying to install kubectl 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 .
```

but it gives an error like:

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

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Can you try with "name": "kubectl" instead of "snaps"?

There are different features available if you install one vs if you install many:

https://github.com/snapcore/snapd/blob/master/client/snap_op.go#L80

affects: snappy → snapd
Changed in snapd:
status: New → Incomplete
Revision history for this message
kapil chouhan (kapilchouhan99) wrote :

Thanks for your reply, it's working now. Just one suggestion could you please update your REST API doc https://github.com/snapcore/snapd/wiki/REST-API#post-v2snaps

Revision history for this message
John Lenton (chipaca) wrote :

Done, thank you.

Changed in snapd:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.