Skip to content
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

upgrade.sh's image removal causes conflicts with existing third party containers sharing same dependency #237

Open
GrimmiMeloni opened this issue Apr 9, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@GrimmiMeloni
Copy link
Contributor

I am just going through my first upgrade of the Dashboard.
I am running into problems as the removal of the images (docker rmi step) fails.
I am using some of the images also in different projects (in my case it is telegraf). So it is not simply possible to perform the docker image removal like the upgrade script tries to because of these dependencies.

I have worked around this, by removing (and recreating) my other projects, but this feels very invasive. In a nutshell the upgrade.sh in its current form assumes exclusivity, which it should not.
I would recommend a different approach for the upgrade, like for example using an explicit docker pull telegraf:latest instead.

@jasonacox
Copy link
Owner

Hi @GrimmiMeloni ! Thanks for opening this. You are right! It would be good to make this change. Are you interested in submitting a PR to fix it? I'll tag this as a bug.

@jasonacox jasonacox added the bug Something isn't working label Apr 9, 2023
@GrimmiMeloni
Copy link
Contributor Author

Hey Jason, happy to help.
Before I start hacking away, let's agree on what the end result should look like.

I would suggest the following solution:

  1. remove the image removal steps out of upgrade.sh. My rationale is both the problem stated in my initial report, but also after more thought, I think Powerwall-Dash even without such a problem, should not touch the local image registry and toss things away. I think it should be left to the system's operator to decide when a good time for pruning has come.

  2. Change the compose file, to move away from using latest images, and use explicit versioning of the dependencies. It is anyways good style (repeatable builds/installs), and will also ensure that all users of Powerdash have the same experience. A good summary on all the shenanigans using latest bring can be found here.
    This change removes the need for explicitly tossing the local images away to fetch something "fresh". Compose can take care of pulling the specified images.
    I suggest the following explicit versions, based on what my local host pulled during yesterday's upgrade.

  • Telegraf: 1.26.1
  • pypowerwall: 0.6.2t25
  • weather411: 0.2.1

@jasonacox
Copy link
Owner

  1. remove the image removal steps out of upgrade.sh

Agree! Plus, the current upgrade is way too slow, mostly due to this image churn.

  1. Change the compose file, to move away from using latest images

Agree! This is brilliant. This makes the version of Powerwall-Dashboard consistent. We should rev the project version (in files VERSION and upgrade.sh) if we change any of the pins. As you pointed out so well, current state makes the project version meaningless and everyone is potentially using a different combination. That makes it difficult to troubleshoot and manage.

Thank you for your help @GrimmiMeloni ! 🙏 This will be a great enhancement.

@GrimmiMeloni
Copy link
Contributor Author

created PR #240 for this

jasonacox added a commit that referenced this issue Apr 12, 2023
fix issue #237 remove docker image pruning in upgrade script
jasonacox added a commit that referenced this issue Apr 12, 2023
@jasonacox
Copy link
Owner

Thanks @GrimmiMeloni ! Merged and released as v2.9.0.

Please report any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants