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

Failed to add disk to instance 'charmcraft-mysql-router-834497-1-0-amd64' #1375

Closed
carlcsaposs-canonical opened this issue Nov 13, 2023 · 2 comments
Labels
Bug Something isn't working

Comments

@carlcsaposs-canonical
Copy link
Contributor

carlcsaposs-canonical commented Nov 13, 2023

Bug Description

2023-11-13 10:24:54.580 Failed to add disk to instance 'charmcraft-mysql-router-834497-1-0-amd64'.
2023-11-13 10:24:54.580 Detailed information: * Command that failed: 'lxc --project charmcraft config device add local:charmcraft-mysql-router-834497-1-0-amd64 disk-/root/.cache/pip disk source=/home/ubuntu/snap/charmcraft/common/cache/charmcraft/charmcraft-buildd-base-v2.0/BuilddBaseAlias.JAMMY/pip path=/root/.cache/pip'
* Command exit code: 1
* Command standard error output: b'Error: The device already exists\n'

To Reproduce

Unable to reproduce; likely caused by manually messing around with the environment (e.g. manually mounting the cache folder, swapping between charmcraft versions)

Environment

Ubuntu 22.04
charmcraft 2.5.0 snap rev 1736

charmcraft.yaml

# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.

type: charm
bases:
  # Whenever "bases" is changed:
  # - Update tests/integration/conftest.py::pytest_configure()
  # - Update .github/workflow/ci.yaml integration-test matrix
  - build-on:
      - name: "ubuntu"
        channel: "20.04"
    run-on:
      - name: "ubuntu"
        channel: "20.04"
  - build-on:
      - name: "ubuntu"
        channel: "22.04"
    run-on:
      - name: "ubuntu"
        channel: "22.04"
parts:
  charm:
    override-pull: |
      craftctl default
      if [[ ! -f requirements.txt ]]
      then
          echo 'ERROR: Use "tox run -e build" instead of calling "charmcraft pack" directly' >&2
          exit 1
      fi
    charm-entrypoint: src/machine_charm.py

Relevant log output

charmcraft-20231113-102334.961894.log

@carlcsaposs-canonical carlcsaposs-canonical added the Bug Something isn't working label Nov 13, 2023
@carlcsaposs-canonical
Copy link
Contributor Author

Note: only happens on 2nd base, not first base

@lengau
Copy link
Collaborator

lengau commented Dec 4, 2023

Thanks for this report! I think this is something that is fixed by not mounting cache directories in base instances, which means it shouldn't occur again with 2.5.3 once we get that released. Please reopen if it does reoccur though.

cc @mr-cal for awarness

@lengau lengau closed this as completed Dec 4, 2023
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