← Back to issue list

charmcraft init produces error charm for machine charms

View original Github issue

Metadata

Project
charmcraft
Number
#328
Type
issue
State
closed
Author
erik78se
Labels
Created
Updated
Closed

Current evaluation

Closed without resolution. Maintainers acknowledged the core issue persists: charmcraft init still lacks a machine charm template or flag, leaving machine charm workflows unsupported despite claims that metadata changes fixed it.

Suggested action:

No scores available.

Issue body

### description I'm having a really bad experience from starting charming with charmcraft. The default charm created as part of a "charmcraft init" seems defaulted to a kubernetes charm, which means that for anyone like me - still working on machine charms - the produced charm is broken from start and needs to be heavily modified to get running. Consider new charmers. They will be stuck from start and giving up here. The produced charm from "charmcraft init" should NEVER fail as this destroys the experience from anyone trying to get started on juju. **Please create a charm that works from start regardless if you are working on a K8 or machine charm.** Since K8 charms and Machine charms are so different, it should be two different default charms created I guess. So, charmcraft init should really take that into consideration. ### version used charmcraft 1.0.0 403 latest/beta canonical✓ -

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Closed without resolution. Maintainers acknowledged the core issue persists: charmcraft init still lacks a machine charm template or flag, leaving machine charm workflows unsupported despite claims that metadata changes fixed it.
qwen/qwen3.6-35b-a3b Closed as resolved after removing the series keyword from metadata.yaml. The core request to add --vm or --k8s flags for charmcraft init was not implemented.
qwen/qwen3.6-35b-a3b Abandoned. A maintainer closed the issue claiming it was fixed by removing the series keyword from metadata.yaml, but the contributor clarified the core problem persists: charmcraft init still defaults to Kubernetes charms, leaving machine charm templates broken.
qwen3.6-35b-a3b-mtp-q6 Closed without resolution. A maintainer claimed removing the series field fixed the problem, but another noted the core issue remains: charmcraft init still defaults to Kubernetes and lacks machine charm support. The request was abandoned.
qwen3.6-35b-a3b-mtp-q6 Closed as fixed after removing the series keyword from metadata.yaml. The original request for explicit machine or Kubernetes charm templates or flags in charmcraft init remains unaddressed.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#568 Add a `charmcraft init` template for machine charms charmcraft closed Closed without implementation. The request to add a machine charm template to charmcraft init was acknowledged as valuable but remains unaddressed and effectively abandoned.
79%
#2167 charmcraft init --profile machine does not produce a valid charmcraft.yaml charmcraft closed Closed and converted to a feature request. The machine profile template uses the legacy bases key, causing validation failures on newer versions. Resolution involves updating templates to use the platforms key.
77%
#2494 charmcraft pack wont produce a proper charm charmcraft open charmcraft init machine profile produced 22.04 base and ignored pyproject.toml deps (uv.lock needed). Base bumped to 24.04 in #2522; init output now explains uv lock in #2754. Docs/template improvements still open.
73%
#672 charmcraft 1.4.0: impossible to login to charmhub charmcraft closed Closed as expected behavior. Charmcraft falls back to a non-persistent memory ring on headless systems lacking a keyring, preventing credential persistence. Maintainers advised exporting credentials via environment variables instead of implementing a code fix.
71%
#1139 `charmcraft init --profile machine` doesn't produce `config.yaml` charmcraft closed Fixed in PR #1149. The machine charm init template and output were updated to remove config.yaml and metadata.yaml from the default files, now directing users to only edit charmcraft.yaml.
71%
#850 charmcraft release failed for revision that is in the charmhub charmcraft closed Closed as out of scope. Charmhub's auto-release feature exposed missing resource specifications. Identified as a Launchpad-Charmhub integration issue, not a charmcraft bug. Author will file a separate bug with Charmhub.
71%
#465 `charmcraft init` produces charm with `unknown` language and framework charmcraft closed Closed after identifying the root cause as a bug in the analyze command during charm file extraction, not charmcraft init. The maintainers fixed the extraction logic to correctly populate language and framework metadata.
71%
#238 `charmcraft init` creates broken charm charmcraft closed Superseded by PR #247, which overhauls charmcraft init and its tests to prevent broken charm generation from commented-out actions. The new implementation resolves the template and test failures.
70%