The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7022
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) ===
From 94082fc34ef68236d5e5e9a225e04cc101bf3762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Fri, 13 Mar 2020 13:44:43 -0400 Subject: [PATCH 1/2] lxc/export: Make API call more correct MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxc/publish.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lxc/publish.go b/lxc/publish.go index 102e3921de..f17569438e 100644 --- a/lxc/publish.go +++ b/lxc/publish.go @@ -197,7 +197,7 @@ func (c *cmdPublish) Run(cmd *cobra.Command, args []string) error { // Create the image req := api.ImagesPost{ Source: &api.ImagesPostSource{ - Type: "container", + Type: "instance", Name: cName, }, CompressionAlgorithm: c.flagCompressionAlgorithm, @@ -206,6 +206,8 @@ func (c *cmdPublish) Run(cmd *cobra.Command, args []string) error { if shared.IsSnapshot(cName) { req.Source.Type = "snapshot" + } else if !s.HasExtension("instances") { + req.Source.Type = "container" } if cRemote == iRemote { From 2a3b3a028c083f8de85bc54863172306ad9337aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Fri, 13 Mar 2020 16:52:25 -0400 Subject: [PATCH 2/2] lxd/instances/snapshot: Fix expiration in profiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/instance_snapshot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lxd/instance_snapshot.go b/lxd/instance_snapshot.go index 6652cfa951..c6d577f901 100644 --- a/lxd/instance_snapshot.go +++ b/lxd/instance_snapshot.go @@ -144,7 +144,7 @@ func containerSnapshotsPost(d *Daemon, r *http.Request) response.Response { if req.ExpiresAt != nil { expiry = *req.ExpiresAt } else { - expiry, err = shared.GetSnapshotExpiry(time.Now(), inst.LocalConfig()["snapshots.expiry"]) + expiry, err = shared.GetSnapshotExpiry(time.Now(), inst.ExpandedConfig()["snapshots.expiry"]) if err != nil { return response.BadRequest(err) }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel