Description
The version key should actually be in the v1 buckets.
|
// Below is the current database schema. This should be updated each time |
|
// the structure is changed in addition to adding a migration and incrementing |
|
// the database version. Note that `╘══*...*` refers to maps with arbitrary |
|
// keys. |
|
// ├──version : <varint> - Latest version, see migrations |
|
// └──v1 - Schema version bucket |
|
// ╘══*namespace* |
|
// ├──labels |
|
// │ ╘══*key* : <string> - Label value |
|
// ├──image |
|
// │ ╘══*image name* |
code:
|
bkt, err := tx.CreateBucketIfNotExists(bucketKeyVersion) |
|
if err != nil { |
|
return err |
|
} |
|
|
|
versionEncoded, err := encodeInt(dbVersion) |
|
if err != nil { |
|
return err |
|
} |
|
|
|
return bkt.Put(bucketKeyDBVersion, versionEncoded) |
use bbolt cmd
root@iceber-master:~# ./bbolt keys /var/lib/containerd/io.containerd.metadata.v1.bolt/meta.db v1
default
k8s.io
moby
stress
version
And the namespace name cannot be version.
root@iceber-master:~# ctr namespaces create version
ctr: incompatible value: unknown
Describe the results you received and expected
Could we change the database schema to
// Below is the current database schema. This should be updated each time
// the structure is changed in addition to adding a migration and incrementing
// the database version. Note that `╘══*...*` refers to maps with arbitrary
// keys.
// └──v1 - Schema version bucket
// ├──version : <varint> - Latest version, see migrations
// ╘══*namespace*
// ├──labels
// │ ╘══*key* : <string> - Label value
// ├──image
and verify that it is equal to version when creating the namespace?
What version of containerd are you using?
containerd github.com/containerd/containerd 1.5.2-0ubuntu1~20.04.2
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response
Description
The
versionkey should actually be in thev1buckets.containerd/metadata/buckets.go
Lines 45 to 55 in b9bffd1
code:
containerd/metadata/db.go
Lines 194 to 204 in b9bffd1
use bbolt cmd
And the namespace name cannot be version.
Describe the results you received and expected
Could we change the database schema to
and verify that it is equal to version when creating the namespace?
What version of containerd are you using?
containerd github.com/containerd/containerd 1.5.2-0ubuntu1~20.04.2
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response