Skip to content

Commit

Permalink
incusd/instances/publish: Fix base metadata
Browse files Browse the repository at this point in the history
Closes #1371

Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Nov 14, 2024
1 parent 58a72e0 commit eeca45b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/server/instance/drivers/driver_lxc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5280,6 +5280,9 @@ func (d *lxc) Export(w io.Writer, properties map[string]string, expiration time.
return meta, err
}

// Fill in the metadata.
meta.Architecture = arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / Code (stable)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (stable, standalone, lvm)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / Code (oldstable)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (stable, standalone, ceph)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (stable, cluster, btrfs)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (stable, cluster, random)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (oldstable, cluster, dir)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (stable, standalone, random)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (stable, standalone, zfs)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (stable, cluster, zfs)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (stable, cluster, ceph)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (stable, standalone, dir)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (oldstable, standalone, dir)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (stable, standalone, btrfs)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (stable, cluster, dir)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (stable, cluster, lvm)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / Code (tip)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (tip, cluster, dir)

undefined: arch

Check failure on line 5284 in internal/server/instance/drivers/driver_lxc.go

View workflow job for this annotation

GitHub Actions / System (tip, standalone, dir)

undefined: arch
meta.CreationDate = time.Now().UTC().Unix()
if !expiration.IsZero() {
meta.ExpiryDate = expiration.UTC().Unix()
}
Expand Down
3 changes: 3 additions & 0 deletions internal/server/instance/drivers/driver_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -6469,6 +6469,9 @@ func (d *qemu) Export(w io.Writer, properties map[string]string, expiration time
return meta, err
}

// Fill in the metadata.
meta.Architecture = arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / Code (stable)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (stable, standalone, lvm)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / Code (oldstable)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (stable, standalone, ceph)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (stable, cluster, btrfs)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (stable, cluster, random)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (oldstable, cluster, dir)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (stable, standalone, random)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (stable, standalone, zfs)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (stable, cluster, zfs)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (stable, cluster, ceph)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (stable, standalone, dir)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (oldstable, standalone, dir)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (stable, standalone, btrfs)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (stable, cluster, dir)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (stable, cluster, lvm)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / Code (tip)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (tip, cluster, dir)

undefined: arch

Check failure on line 6473 in internal/server/instance/drivers/driver_qemu.go

View workflow job for this annotation

GitHub Actions / System (tip, standalone, dir)

undefined: arch
meta.CreationDate = time.Now().UTC().Unix()
if !expiration.IsZero() {
meta.ExpiryDate = expiration.UTC().Unix()
}
Expand Down

0 comments on commit eeca45b

Please sign in to comment.