Skip to content

Commit

Permalink
Merge pull request juju#17412 from nvinuesa/juju-6048
Browse files Browse the repository at this point in the history
juju#17412

In the context of dropping the fan networking support on 4.0+, this patch removes the fanconfigurer worker, which applied the fan configuration using `fanctl`, which is part of the ubuntu-fan package and no longer installed after the patch juju#17410 lands.

All api endpoints regarding fanconfigurer have also been removed.

## Checklist


- [X] Code style: imports ordered, good names, simple structure, etc
- [X] Comments saying why design decisions were made
- [X] Go unit tests, with comments saying what you're testing
- [ ] ~[Integration tests](https://github.com/juju/juju/tree/main/tests), with comments saying what you're testing~
- [ ] ~[doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed packages~

## QA steps

Bootstrap on aws and deploy:

```
juju bootstrap aws c
juju add-model m
juju deploy ubuntu --to lxd
```
and make sure there are no errors on the logs.

Also, 3.6->4.0 migration should not be broken:
```
juju_36 bootstrap aws 36
juju_36 add-model m
juju_36 deploy ubuntu --to lxd
# install this patch at this point
juju bootstrap aws c40
juju switch c36:admin/m
juju migrate c40
```
Check the logs and the status after migration, the model should have been correctly migrated.
## Links

**Jira card:** JUJU-6048
  • Loading branch information
jujubot authored May 28, 2024
2 parents d09cde5 + b0667c6 commit 14ea518
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 267 deletions.
2 changes: 2 additions & 0 deletions api/agent/fanconfigurer/facade.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ type Facade struct {
caller base.FacadeCaller
}

// TODO(nvinuesa): This entire facade should be removed since it's not used
// anymore (the fanconfigurer worker has been removed).
// NewFacade creates a new client-side FanConfigu er facade.
func NewFacade(caller base.APICaller, options ...Option) *Facade {
return &Facade{
Expand Down
2 changes: 2 additions & 0 deletions apiserver/facades/agent/fanconfigurer/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"github.com/juju/juju/apiserver/facade"
)

// TODO(nvinuesa): This entire facade should be removed since it's not used
// anymore (the fanconfigurer worker has been removed).
// Register is called to expose a package of facades onto a given registry.
func Register(registry facade.FacadeRegistry) {
registry.MustRegister("FanConfigurer", 1, func(stdCtx context.Context, ctx facade.ModelContext) (facade.Facade, error) {
Expand Down
1 change: 0 additions & 1 deletion cmd/jujud-controller/agent/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ var (
"api-address-updater",
"deployer",
"disk-manager",
"fan-configurer",
"is-bootstrap-flag",
"is-bootstrap-gate",
"is-controller-flag",
Expand Down
15 changes: 3 additions & 12 deletions cmd/jujud-controller/agent/machine/manifolds.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ import (
"github.com/juju/juju/internal/worker/deployer"
"github.com/juju/juju/internal/worker/diskmanager"
"github.com/juju/juju/internal/worker/externalcontrollerupdater"
"github.com/juju/juju/internal/worker/fanconfigurer"
"github.com/juju/juju/internal/worker/filenotifywatcher"
"github.com/juju/juju/internal/worker/fortress"
"github.com/juju/juju/internal/worker/gate"
Expand Down Expand Up @@ -942,11 +941,6 @@ func IAASManifolds(config ManifoldsConfig) dependency.Manifolds {
NewWorker: hostkeyreporter.NewWorker,
})),

fanConfigurerName: ifNotMigrating(fanconfigurer.Manifold(fanconfigurer.ManifoldConfig{
APICallerName: apiCallerName,
Clock: config.Clock,
})),

certificateUpdaterName: ifFullyUpgraded(certupdater.Manifold(certupdater.ManifoldConfig{
AgentName: agentName,
AuthorityName: certificateWatcherName,
Expand All @@ -959,12 +953,10 @@ func IAASManifolds(config ManifoldsConfig) dependency.Manifolds {

// The machiner Worker will wait for the identified machine to become
// Dying and make it Dead; or until the machine becomes Dead by other
// means. This worker needs to be launched after fanconfigurer
// so that it reports interfaces created by it.
// means.
machinerName: ifNotMigrating(machiner.Manifold(machiner.ManifoldConfig{
AgentName: agentName,
APICallerName: apiCallerName,
FanConfigurerName: fanConfigurerName,
AgentName: agentName,
APICallerName: apiCallerName,
})),

// DBAccessor is a manifold that provides a DBAccessor worker
Expand Down Expand Up @@ -1333,7 +1325,6 @@ const (
toolsVersionCheckerName = "tools-version-checker"
machineActionName = "machine-action-runner"
hostKeyReporterName = "host-key-reporter"
fanConfigurerName = "fan-configurer"
externalControllerUpdaterName = "external-controller-updater"
isPrimaryControllerFlagName = "is-primary-controller-flag"
isControllerFlagName = "is-controller-flag"
Expand Down
14 changes: 0 additions & 14 deletions cmd/jujud-controller/agent/machine/manifolds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func (s *ManifoldsSuite) TestManifoldNamesIAAS(c *gc.C) {
"deployer",
"disk-manager",
"external-controller-updater",
"fan-configurer",
"file-notify-watcher",
"host-key-reporter",
"http-server-args",
Expand Down Expand Up @@ -731,18 +730,6 @@ var expectedMachineManifoldsWithDependenciesIAAS = map[string][]string{
"upgrade-steps-gate",
},

"fan-configurer": {
"agent",
"api-caller",
"api-config-watcher",
"migration-fortress",
"migration-inactive-flag",
"upgrade-check-flag",
"upgrade-check-gate",
"upgrade-steps-flag",
"upgrade-steps-gate",
},

"file-notify-watcher": {
"agent",
"is-controller-flag",
Expand Down Expand Up @@ -964,7 +951,6 @@ var expectedMachineManifoldsWithDependenciesIAAS = map[string][]string{
"agent",
"api-caller",
"api-config-watcher",
"fan-configurer",
"migration-fortress",
"migration-inactive-flag",
"upgrade-check-flag",
Expand Down
1 change: 0 additions & 1 deletion cmd/jujud/agent/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ var (
"api-address-updater",
"deployer",
"disk-manager",
"fan-configurer",
"is-bootstrap-flag",
"is-bootstrap-gate",
"is-controller-flag",
Expand Down
15 changes: 3 additions & 12 deletions cmd/jujud/agent/machine/manifolds.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import (
"github.com/juju/juju/internal/worker/credentialvalidator"
"github.com/juju/juju/internal/worker/deployer"
"github.com/juju/juju/internal/worker/diskmanager"
"github.com/juju/juju/internal/worker/fanconfigurer"
"github.com/juju/juju/internal/worker/fortress"
"github.com/juju/juju/internal/worker/gate"
"github.com/juju/juju/internal/worker/hostkeyreporter"
Expand Down Expand Up @@ -414,19 +413,12 @@ func IAASManifolds(config ManifoldsConfig) dependency.Manifolds {
NewWorker: hostkeyreporter.NewWorker,
})),

fanConfigurerName: ifNotMigrating(fanconfigurer.Manifold(fanconfigurer.ManifoldConfig{
APICallerName: apiCallerName,
Clock: config.Clock,
})),

// The machiner Worker will wait for the identified machine to become
// Dying and make it Dead; or until the machine becomes Dead by other
// means. This worker needs to be launched after fanconfigurer
// so that it reports interfaces created by it.
// means.
machinerName: ifNotMigrating(machiner.Manifold(machiner.ManifoldConfig{
AgentName: agentName,
APICallerName: apiCallerName,
FanConfigurerName: fanConfigurerName,
AgentName: agentName,
APICallerName: apiCallerName,
})),

// The diskmanager worker periodically lists block devices on the
Expand Down Expand Up @@ -679,7 +671,6 @@ const (
toolsVersionCheckerName = "tools-version-checker"
machineActionName = "machine-action-runner"
hostKeyReporterName = "host-key-reporter"
fanConfigurerName = "fan-configurer"
instanceMutaterName = "instance-mutater"
auditConfigUpdaterName = "audit-config-updater"
stateConverterName = "state-converter"
Expand Down
14 changes: 0 additions & 14 deletions cmd/jujud/agent/machine/manifolds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func (s *ManifoldsSuite) TestManifoldNamesIAAS(c *gc.C) {
"clock",
"deployer",
"disk-manager",
"fan-configurer",
"host-key-reporter",
"instance-mutater",
"log-sender",
Expand Down Expand Up @@ -460,18 +459,6 @@ var expectedMachineManifoldsWithDependenciesIAAS = map[string][]string{
"upgrade-steps-gate",
},

"fan-configurer": {
"agent",
"api-caller",
"api-config-watcher",
"migration-fortress",
"migration-inactive-flag",
"upgrade-check-flag",
"upgrade-check-gate",
"upgrade-steps-flag",
"upgrade-steps-gate",
},

"host-key-reporter": {
"agent",
"api-caller",
Expand Down Expand Up @@ -565,7 +552,6 @@ var expectedMachineManifoldsWithDependenciesIAAS = map[string][]string{
"agent",
"api-caller",
"api-config-watcher",
"fan-configurer",
"migration-fortress",
"migration-inactive-flag",
"upgrade-check-flag",
Expand Down
128 changes: 0 additions & 128 deletions internal/worker/fanconfigurer/fanconfigurer.go

This file was deleted.

60 changes: 0 additions & 60 deletions internal/worker/fanconfigurer/manifold.go

This file was deleted.

14 changes: 0 additions & 14 deletions internal/worker/fanconfigurer/package_test.go

This file was deleted.

Loading

0 comments on commit 14ea518

Please sign in to comment.