Skip to content

Commit c64d2e1

Browse files
committed
fix rollback remove same name issue
1 parent 0bba59e commit c64d2e1

4 files changed

Lines changed: 3 additions & 143 deletions

File tree

hypervisor/cloudhypervisor/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (ch *CloudHypervisor) reserveVM(ctx context.Context, id string, vmCfg *type
9797
func (ch *CloudHypervisor) rollbackCreate(ctx context.Context, id, name string) {
9898
if err := ch.store.Update(ctx, func(idx *hypervisor.VMIndex) error {
9999
delete(idx.VMs, id)
100-
if name != "" {
100+
if name != "" && idx.Names[name] == id {
101101
delete(idx.Names, name)
102102
}
103103
return nil

images/oci/erofs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
)
1010

1111
const (
12-
erofsBlockSize = 16384
12+
erofsBlockSize = 4096
1313
erofsCompression = "lz4hc"
1414
)
1515

@@ -19,7 +19,7 @@ const (
1919
//
2020
// This mirrors start.sh's per-layer conversion:
2121
//
22-
// mkfs.erofs --tar=f -zlz4hc -C16384 -T0 -U <uuid> output.erofs
22+
// mkfs.erofs --tar=f -zlz4hc -C4096 -T0 -U <uuid> output.erofs
2323
func startErofsConversion(ctx context.Context, uuid, outputPath string) (cmd *exec.Cmd, stdin io.WriteCloser, output *bytes.Buffer, err error) {
2424
cmd = exec.CommandContext(ctx, "mkfs.erofs", //nolint:gosec
2525
"--tar=f",

os-image/ubuntu/24.04-redroid/Dockerfile

Lines changed: 0 additions & 70 deletions
This file was deleted.

os-image/ubuntu/24.04-redroid2/Dockerfile

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)