SSP allows setting a override in air-gap mode, and ignores it
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snap Store Server |
New
|
Undecided
|
Unassigned |
Bug Description
SSP allows setting override for air-gap brand store snap, but ignores it.
Expectation
-----------
Command to set the override in air gap SSP should not have apparently succeeded:
Actual Experience
-----------------
Command to set override in air gap proxy did apparently succeed:
root@snap-
test-revision stable armhf 12 (upstream 12)
root@snap-
Here's the detail
=================
test-revision snap (armhf) rev 12 is in ce-team-test store on latest/stable
-------
$ snapcraft status test-revision
Track Arch Channel Version Revision
latest amd64 stable - -
armhf stable 0.3 12
Snap Store Proxy (SSP) is in air gap mode
-------
root@snap-
Store is in device authenticated air-gapped mode
Store ID: VJOYSBLFu9vv5Rc
Custom local stores:
Brand ID Name ID
P6dgVeuoAbrvP
Local account keys:
Account ID Name Public Key SHA3-384
(redacted)
generic models d-JcZF9nD9eBw7b
generic serials wrfougkz3Huq2T_
Internal Service Status:
memcached: running
nginx: running
snapassert: running
snapauth: running
snapdevicegw: running
snapdevicegw-
snapident: running
snapproxy: running
snaprevs: running
In online SSP, I get test-revision snap
-------
root@snap-
Fetching channel map info for test-revision
Fetching revision 12 for test-revision
Downloaded test-revision to /var/snap/
In air gap SSP, I push the test-revision rev 12 snap with channel map
-------
root@snap-
Snap pushed
In air gap SSP, I set override for test-revision to rev 12
-------
root@snap-
test-revision stable armhf 12 (upstream 12)
root@snap-
This appears to work, but, air gap SSP list-overrides seems to contradict
-------
root@snap-
Proxy is in air-gapped mode, upstream revisions are not available
root@snap-
Device using air gap SSP sees rev 12 (as expected)
-------
knitzsche@ubuntu:~$ snap info test-revision
name: test-revision
summary: summary
publisher: knitzsche (Kyle Nitzsche)
store-url: https:/
license: unset
description: |
snap-id: Hd1B6bexX487FYw
channels:
latest/stable: 0.3 2021-12-07 (12) 8kB -
latest/candidate: ↑
latest/beta: ↑
latest/edge: ↑
knitzsche@ubuntu:~$
Release test-revision (armhf) rev 13 to stable
-------
$ snapcraft upload test-revision_
Preparing to upload 'test-revision_
After uploading, the resulting snap revision will be released to 'stable' when it passes the Snap Store review.
Running the review tools before pushing this snap to the Snap Store.
Generating delta for 'test-revision_
Pushing 'test-revision_
Processing...|
released
Revision 13 of 'test-revision' created.
Track Arch Channel Version Revision
latest armhf stable 0.3 13
In online SSP get test-revision, in air gap push it withouto channel map
-------
root@snap-
Fetching channel map info for test-revision
Fetching revision 13 for test-revision
Downloaded test-revision to /var/snap/
other system:
$ lxc file pull snap-store-
$ lxc file push test-revision-
air gap SSP:
root@snap-
Uploaded snap and assertions for test-revision revision 13
Channel map already exists.
Not updating the channel map, you can try again with `--push-
Snap pushed
On device, no channel map, new rev 13 not avail
-------
knitzsche@ubuntu:~$ snap info test-revision
name: test-revision
summary: summary
publisher: knitzsche (Kyle Nitzsche)
store-url: https:/
license: unset
description: |
snap-id: Hd1B6bexX487FYw
channels:
latest/stable: 0.3 2021-12-07 (12) 8kB -
latest/candidate: ↑
latest/beta: ↑
latest/edge: ↑
knitzsche@ubuntu:~$
On air gap SSP, push with channel map
-------
root@snap-
Snap pushed
On device, with channel map, rev 13 IS NOW AVAILABLE
-------
knitzsche@ubuntu:~$ snap info test-revision
name: test-revision
summary: summary
publisher: knitzsche (Kyle Nitzsche)
store-url: https:/
license: unset
description: |
snap-id: Hd1B6bexX487FYw
channels:
latest/stable: 0.3 2021-12-07 (13) 8kB -
latest/candidate: ↑
latest/beta: ↑
latest/edge: ↑
knitzsche@ubuntu:~$