Skip to content

Commit

Permalink
Backports (stable-5.0) (#14313)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomponline authored Oct 21, 2024
2 parents 18a3c6c + ef931ee commit 9a289b2
Show file tree
Hide file tree
Showing 41 changed files with 99 additions and 80 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ require (
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/tools v0.26.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
google.golang.org/grpc v1.67.1 // indirect
gopkg.in/errgo.v1 v1.0.1 // indirect
gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1034,8 +1034,8 @@ google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJ
google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s=
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8=
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 h1:QCqS/PdaHTSWGvupk2F/ehwHtGc0/GYkT+3GAcR1CCc=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 h1:X58yt85/IXCx0Y3ZwN6sEIKZzQtDEYaBWrDvErdXrRE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
Expand Down
2 changes: 1 addition & 1 deletion lxc/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ type cmdProfileSet struct {

func (c *cmdProfileSet) Command() *cobra.Command {
cmd := &cobra.Command{}
cmd.Use = usage("set", i18n.G("[<remote>:]<profile> <key><value>..."))
cmd.Use = usage("set", i18n.G("[<remote>:]<profile> <key>=<value>..."))
cmd.Short = i18n.G("Set profile configuration keys")
cmd.Long = cli.FormatSection(i18n.G("Description"), i18n.G(
`Set profile configuration keys
Expand Down
19 changes: 18 additions & 1 deletion lxd/network/driver_bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -3110,6 +3110,18 @@ func (n *bridge) Leases(projectName string, clientType request.ClientType) ([]ap
return nil, err
}

leasesCh := make(chan api.NetworkLease)

var wg sync.WaitGroup
wg.Add(1)
go func() {
for lease := range leasesCh {
leases = append(leases, lease)
}

wg.Done()
}()

err = notifier(func(client lxd.InstanceServer) error {
memberLeases, err := client.GetNetworkLeases(n.name)
if err != nil {
Expand All @@ -3119,12 +3131,17 @@ func (n *bridge) Leases(projectName string, clientType request.ClientType) ([]ap
// Add local leases from other members, filtering them for MACs that belong to the project.
for _, lease := range memberLeases {
if lease.Hwaddr != "" && shared.StringInSlice(lease.Hwaddr, projectMacs) {
leases = append(leases, lease)
leasesCh <- lease
}
}

return nil
})

// Finish up and wait for go routine.
close(leasesCh)
wg.Wait()

if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions po/ber.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:10+0000\n"
"Last-Translator: Anonymous <[email protected]>\n"
"Language-Team: Berber <https://hosted.weblate.org/projects/linux-containers/"
Expand Down Expand Up @@ -6088,7 +6088,7 @@ msgid "[<remote>:]<profile> <key>"
msgstr ""

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/bg.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:09+0000\n"
"Last-Translator: Anonymous <[email protected]>\n"
"Language-Team: Bulgarian <https://hosted.weblate.org/projects/linux-"
Expand Down Expand Up @@ -6088,7 +6088,7 @@ msgid "[<remote>:]<profile> <key>"
msgstr ""

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/ca.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:10+0000\n"
"Last-Translator: Anonymous <[email protected]>\n"
"Language-Team: Catalan <https://hosted.weblate.org/projects/linux-containers/"
Expand Down Expand Up @@ -6088,7 +6088,7 @@ msgid "[<remote>:]<profile> <key>"
msgstr ""

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:11+0000\n"
"Last-Translator: Anonymous <[email protected]>\n"
"Language-Team: Czech <https://hosted.weblate.org/projects/linux-containers/"
Expand Down Expand Up @@ -6088,7 +6088,7 @@ msgid "[<remote>:]<profile> <key>"
msgstr ""

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: LXD\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:06+0000\n"
"Last-Translator: Krombel <[email protected]>\n"
"Language-Team: German <https://hosted.weblate.org/projects/linux-containers/"
Expand Down Expand Up @@ -7134,7 +7134,7 @@ msgstr ""

#: lxc/profile.go:800
#, fuzzy
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""
"Ändert den Laufzustand eines Containers in %s.\n"
"\n"
Expand Down
4 changes: 2 additions & 2 deletions po/el.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:06+0000\n"
"Last-Translator: Anonymous <[email protected]>\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/linux-containers/"
Expand Down Expand Up @@ -6155,7 +6155,7 @@ msgid "[<remote>:]<profile> <key>"
msgstr ""

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/eo.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:11+0000\n"
"Last-Translator: Anonymous <[email protected]>\n"
"Language-Team: Esperanto <https://hosted.weblate.org/projects/linux-"
Expand Down Expand Up @@ -6088,7 +6088,7 @@ msgid "[<remote>:]<profile> <key>"
msgstr ""

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:08+0000\n"
"Last-Translator: Alonso José Lara Plana <[email protected]>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/linux-containers/"
Expand Down Expand Up @@ -6540,7 +6540,7 @@ msgstr "No se puede proveer el nombre del container a la lista"

#: lxc/profile.go:800
#, fuzzy
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr "No se puede proveer el nombre del container a la lista"

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/fa.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:09+0000\n"
"Last-Translator: Anonymous <[email protected]>\n"
"Language-Team: Persian <https://hosted.weblate.org/projects/linux-containers/"
Expand Down Expand Up @@ -6088,7 +6088,7 @@ msgid "[<remote>:]<profile> <key>"
msgstr ""

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/fi.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:08+0000\n"
"Last-Translator: Anonymous <[email protected]>\n"
"Language-Team: Finnish <https://hosted.weblate.org/projects/linux-containers/"
Expand Down Expand Up @@ -6088,7 +6088,7 @@ msgid "[<remote>:]<profile> <key>"
msgstr ""

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: LXD\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:06+0000\n"
"Last-Translator: Wivik <[email protected]>\n"
"Language-Team: French <https://hosted.weblate.org/projects/linux-containers/"
Expand Down Expand Up @@ -7370,7 +7370,7 @@ msgstr ""

#: lxc/profile.go:800
#, fuzzy
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""
"Change l'état d'un ou plusieurs conteneurs à %s.\n"
"\n"
Expand Down
4 changes: 2 additions & 2 deletions po/he.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:11+0000\n"
"Last-Translator: Anonymous <[email protected]>\n"
"Language-Team: Hebrew <https://hosted.weblate.org/projects/linux-containers/"
Expand Down Expand Up @@ -6089,7 +6089,7 @@ msgid "[<remote>:]<profile> <key>"
msgstr ""

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/hi.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:08+0000\n"
"Last-Translator: Anonymous <[email protected]>\n"
"Language-Team: Hindi <https://hosted.weblate.org/projects/linux-containers/"
Expand Down Expand Up @@ -6088,7 +6088,7 @@ msgid "[<remote>:]<profile> <key>"
msgstr ""

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/id.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:07+0000\n"
"Last-Translator: Anonymous <[email protected]>\n"
"Language-Team: Indonesian <https://hosted.weblate.org/projects/linux-"
Expand Down Expand Up @@ -6088,7 +6088,7 @@ msgid "[<remote>:]<profile> <key>"
msgstr ""

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:07+0000\n"
"Last-Translator: Luigi Operoso <[email protected]>\n"
"Language-Team: Italian <https://hosted.weblate.org/projects/linux-containers/"
Expand Down Expand Up @@ -6529,7 +6529,7 @@ msgstr "Creazione del container in corso"

#: lxc/profile.go:800
#, fuzzy
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr "Creazione del container in corso"

#: lxc/config_device.go:445
Expand Down
5 changes: 3 additions & 2 deletions po/ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: LXD\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-31 14:23+0000\n"
"Last-Translator: KATOH Yasufumi <[email protected]>\n"
"Language-Team: Japanese <https://hosted.weblate.org/projects/linux-"
Expand Down Expand Up @@ -6712,7 +6712,8 @@ msgid "[<remote>:]<profile> <key>"
msgstr "[<remote>:]<profile> <key>"

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
#, fuzzy
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr "[<remote>:]<profile> <key><value>..."

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/ko.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: 2022-03-10 15:09+0000\n"
"Last-Translator: Anonymous <[email protected]>\n"
"Language-Team: Korean <https://hosted.weblate.org/projects/linux-containers/"
Expand Down Expand Up @@ -6088,7 +6088,7 @@ msgid "[<remote>:]<profile> <key>"
msgstr ""

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""

#: lxc/config_device.go:445
Expand Down
4 changes: 2 additions & 2 deletions po/lxd.pot
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
msgid ""
msgstr "Project-Id-Version: lxd\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2024-10-18 13:21+0000\n"
"POT-Creation-Date: 2024-10-21 14:19+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -5719,7 +5719,7 @@ msgid "[<remote>:]<profile> <key>"
msgstr ""

#: lxc/profile.go:800
msgid "[<remote>:]<profile> <key><value>..."
msgid "[<remote>:]<profile> <key>=<value>..."
msgstr ""

#: lxc/config_device.go:445
Expand Down
Loading

0 comments on commit 9a289b2

Please sign in to comment.