canonical / charm-local-users

A subordinate charm for creating and managing local user accounts and groups on principal units.
Apache License 2.0
0 stars 4 forks source link

Rewrite lxd installation action #25

Closed samuelallan72 closed 3 months ago

samuelallan72 commented 3 months ago

The setup-lxd action was failing on the arm64 runner, at the iptables changes step. This is because the arm64 runner did not have docker installed, but the action command failed if docker was not installed. https://github.com/canonical/setup-lxd/issues/19

As the setup-lxd action is listed as alpha state, and the action is very small, it seems fine to inline the commands here so we can manage it ourselves to suit our use case better.

Differences between runner machines we need to handle:

Ubuntu_ARM64_4C_16G_01 runner:

ubuntu-latest runner:

samuelallan72 commented 3 months ago

Note to reviewers: you can verify that lxd is installed and charmcraft pack succeeds on both runner architectures from these action runs on the debugging/test PR:

jneo8 commented 3 months ago

Hi @samuelallan72

Do you think it's possible to contribute to canonical's action instead of customized here? I feel what you provide have potential to used by everyone.

Pjack commented 3 months ago

Hi @samuelallan72

Do you think it's possible to contribute to canonical's action instead of customized here? I feel what you provide have potential to used by everyone.

Agree, it seems a bug in setup-lxd.

samuelallan72 commented 3 months ago

@jneo8 @Pjack yes, it is a bug in setup-lxd, but I don't like carrying many small actions that do trivial things (I must admit that this is borderline trivial/non-trivial because of the extra config commands though). It's much clearer and more maintainable to do these things more directly. Especially now that we're moving our workflows to the terraform repository, we'll only be maintaining a single copy of each of the workflows, so we won't have a fragmentation issue.

jneo8 commented 3 months ago

I feel it's not avoidable? If we check everything we have now in charm-actions. Call charm-action from terraform template may be more clean and have benefit to all the others who need arm64 setup.

(I am OK to what we have now if contribute to charm-actions take too much time.)

samuelallan72 commented 3 months ago

Ok if that's consensus, I'll look at contributing to the setup-lxd action.

samuelallan72 commented 3 months ago

@jneo8 @Pjack please see canonical/setup-lxd#20 :)