Skip to content

Commit bcd25fc

Browse files
authored
Merge pull request #1495 from stgraber/main
incusd/instance/lxc: Skip instances without idmap allocation yet
2 parents 3567792 + 26ff709 commit bcd25fc

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

internal/server/instance/drivers/driver_lxc.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -566,12 +566,13 @@ func (d *lxc) findIdmap() (*idmap.Set, int64, error) {
566566
continue
567567
}
568568

569-
cBase := int64(0)
570-
if container.ExpandedConfig()["volatile.idmap.base"] != "" {
571-
cBase, err = strconv.ParseInt(container.ExpandedConfig()["volatile.idmap.base"], 10, 64)
572-
if err != nil {
573-
return nil, 0, err
574-
}
569+
if container.ExpandedConfig()["volatile.idmap.base"] == "" {
570+
continue
571+
}
572+
573+
cBase, err := strconv.ParseInt(container.ExpandedConfig()["volatile.idmap.base"], 10, 64)
574+
if err != nil {
575+
return nil, 0, err
575576
}
576577

577578
cSize, err := idmapSize(container.ExpandedConfig()["security.idmap.size"])

0 commit comments

Comments
 (0)