-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove supported containers check at agent for machine startup #17179
base: 3.4
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're not guaranteed to return 1 and only 1 result set in the list. ParseContainerType
only expects one argument.
5521a6f
to
3a59844
Compare
cmd/jujud/agent/machine.go
Outdated
var supportedContainers []instance.ContainerType | ||
supportsContainers := container.ContainersSupported() | ||
if supportsContainers { | ||
supportedContainers = append(supportedContainers, instance.LXD) | ||
supportedContainerType, err := container.ContainersSupported() | ||
if err != nil { | ||
logger.Warningf("determining container support: %v\nno containers possible", err) | ||
} | ||
|
||
if err == nil && supportedContainerType != "" { | ||
supportedContainers = append(supportedContainers, supportedContainerType) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just delete this and tell me what the consequences are?
I suspect this has been broken, so it was never correctly filled in and we haven't noticed till I removed KVM. Considering that, just remove it and try the following:
juju bootstrap lxd
juju bootstrap aws
andjuju add-machine lxd
juju deploy ubuntu --to lxd
This should cover the common cases to ensure this works (there are more)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right in this suspicion, removed all of these checks (including the kvm check) and everything seems to be working just fine (on both lxd and aws).
3a59844
to
4164811
Compare
/build |
1 similar comment
/build |
@cderici let's discuss this at the sprint. |
d638104
to
5ba9a64
Compare
@SimonRichardson bootstrapping with this on lxd and aws, adding machines and deployments works just fine (also tried placement etc), but I'm gonna need extra pair of eyes on the failing test. I'm not sure why this test depends on this check (fails without |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your QA steps don't check whether you can run a container on a machine.
With this change, you can't because all machines exhibit this behaviour:
machine-1: 15:22:59 INFO juju.worker.lxdprovisioner uninstalling no supported containers on "machine-1"
machine-1: 15:22:59 INFO juju.worker.kvmprovisioner uninstalling no supported containers on "machine-1"
We always add the instance.LXD as a supported container for a machine at setup.
5ba9a64
to
16b840c
Compare
/build |
Still got failures in |
…ners We unconditionally add the insatnce.LXD into supported containers at the machine agent, so these tests that were originally failing won't fail anymore.
Yes, I'll write down what's happening for future reference, before this change the The failing tests:
all check against those failures. The new expectation for these tests is to not fail (because the machines always support
so changing the expectation and removing the redundant ones. A side note, there's no specific check in the broker for the |
The
running-in-container
is removed years ago, so this usessystemd-detect-virt
to detect the environment we're running in.Also the
setupContainerSupport
seems to have no effect on provisioning machines, so this removes the pre-checks and allows any invalid provisions to be failed dynamically.Checklist
QA steps
This is used in the agent machine startup, so any newly added machine should be provisioned just fine. Also the placement should be checked as well.
Links
Launchpad bug: https://bugs.launchpad.net/juju/+bug/2056200
Jira card: JUJU-5633