Skip to content

Commit b4aa7c7

Browse files
cleanup unused links (#2549)
* cleanup unused links * update zosbase * pass zbus client to NewSystemMonitor method modified to accept zbus client due to feature in zoslight but it was not passed in zos3 cmds
1 parent 7e864fb commit b4aa7c7

4 files changed

Lines changed: 10 additions & 5 deletions

File tree

cmds/modules/networkd/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ func action(cli *cli.Context) error {
6868
return errors.Wrap(err, "failed to migrate older dhcp service")
6969
}
7070

71+
if err := network.CleanupUnusedLinks(); err != nil {
72+
return errors.Wrap(err, "failed to cleanupUnusedLinks")
73+
}
74+
7175
if err := bootstrap.DefaultBridgeValid(); err != nil {
7276
return errors.Wrap(err, "invalid setup")
7377
}

cmds/modules/noded/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ var Module cli.Command = cli.Command{
5959
}
6060

6161
func registerationServer(ctx context.Context, msgBrokerCon string, env environment.Environment, info registrar.RegistrationInfo) error {
62-
6362
redis, err := zbus.NewRedisClient(msgBrokerCon)
6463
if err != nil {
6564
return errors.Wrap(err, "fail to connect to message broker server")
@@ -221,7 +220,7 @@ func action(cli *cli.Context) error {
221220
}
222221
go events.Start(ctx)
223222

224-
system, err := monitord.NewSystemMonitor(node, 2*time.Second)
223+
system, err := monitord.NewSystemMonitor(node, 2*time.Second, redis)
225224
if err != nil {
226225
log.Fatal().Err(err).Msg("failed to initialize system monitor")
227226
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ require (
1717
github.com/threefoldtech/tfchain/clients/tfchain-client-go v0.0.0-20241127100051-77e684bcb1b2
1818
github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.1-0.20241229121208-76ac3fea5e67
1919
github.com/threefoldtech/zbus v1.0.1
20-
github.com/threefoldtech/zosbase v0.1.3-0.20250225115916-9520b6446e32
20+
github.com/threefoldtech/zosbase v0.1.3-0.20250310105717-bb132c3be10d
2121
github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa
2222
gopkg.in/yaml.v2 v2.4.0
2323
)

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,10 @@ github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.1-0.20241229121208-76ac3
542542
github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.1-0.20241229121208-76ac3fea5e67/go.mod h1:93SROfr+QjgaJ5/jIWtIpLkhaD8Pv8WbdfwvwMNG2p4=
543543
github.com/threefoldtech/zbus v1.0.1 h1:3KaEpyOiDYAw+lrAyoQUGIvY9BcjVRXlQ1beBRqhRNk=
544544
github.com/threefoldtech/zbus v1.0.1/go.mod h1:E/v/xEvG/l6z/Oj0aDkuSUXFm/1RVJkhKBwDTAIdsHo=
545-
github.com/threefoldtech/zosbase v0.1.3-0.20250225115916-9520b6446e32 h1:2QOr/zpJyO0IODr00fuc59ClbIlJIsJtsC9jwQ+bN3U=
546-
github.com/threefoldtech/zosbase v0.1.3-0.20250225115916-9520b6446e32/go.mod h1:rxc49wA04S4IsBOYe0omVO7nu7GXridueh2PJh34gSo=
545+
github.com/threefoldtech/zosbase v0.1.2 h1:JTwL3FFpYCmsGKsNSzXSDAsuL26LmXDjjGXaGxXtIMU=
546+
github.com/threefoldtech/zosbase v0.1.2/go.mod h1:rxc49wA04S4IsBOYe0omVO7nu7GXridueh2PJh34gSo=
547+
github.com/threefoldtech/zosbase v0.1.3-0.20250310105717-bb132c3be10d h1:pMuSAM/NPD5GhheJRY8KUEdfwNdSSEBwwLnP+WADEvY=
548+
github.com/threefoldtech/zosbase v0.1.3-0.20250310105717-bb132c3be10d/go.mod h1:rxc49wA04S4IsBOYe0omVO7nu7GXridueh2PJh34gSo=
547549
github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0=
548550
github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg=
549551
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=

0 commit comments

Comments
 (0)