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

kapp deploy command failed due to "lstat /etc/kappctrl-mem-tmp/kapp-controller-fetch-template-deploy262513077/config: no such file or directory" #1583

Closed
troll-warlord opened this issue Jun 25, 2024 · 4 comments
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution

Comments

@troll-warlord
Copy link

I have below package file (sensitive data omited)

apiVersion: data.packaging.carvel.dev/v1alpha1
kind: Package
metadata:
  name: dummy-name:2.0.0
spec:
  refName: dummy-name
  version: 2.0.0
  releaseNotes: |
    Initial release of the simple app package
  valuesSchema:
    openAPIv3:
      nullable: true
      default: null
  template:
    spec:
      fetch:
      - imgpkgBundle:
          image: registry.com/app1:1.0.0
      - imgpkgBundle:
          image: registry.com/app2:1.0.0
      template:
      - ytt:
          paths:
          - config/
      - kbld:
          paths:
          - .imgpkg/images.yml
          - '-'
      deploy:
      - kapp: {}

When i run this command, kapp deploy -a demo -f pkginstall.yml -y i get below error

Op:      1 create, 0 delete, 0 update, 0 noop, 0 exists
Wait to: 1 reconcile, 0 delete, 0 noop

11:00:03PM: ---- applying 1 changes [0/1 done] ----
11:00:03PM: create packageinstall/demo (packaging.carvel.dev/v1alpha1) namespace: default
11:00:03PM: ---- waiting on 1 changes [0/1 done] ----
11:00:03PM: ongoing: reconcile packageinstall/demo (packaging.carvel.dev/v1alpha1) namespace: default
11:00:03PM:  ^ Waiting for generation 1 to be observed
11:00:06PM: ongoing: reconcile packageinstall/demo (packaging.carvel.dev/v1alpha1) namespace: default
11:00:06PM:  ^ Reconciling
11:00:21PM: fail: reconcile packageinstall/demo (packaging.carvel.dev/v1alpha1) namespace: default
11:00:21PM:  ^ Reconcile failed:  (message: ytt: Error: Checking file '/etc/kappctrl-mem-tmp/kapp-controller-fetch-template-deploy262513077/config': lstat /etc/kappctrl-mem-tmp/kapp-controller-fetch-template-deploy262513077/config: no such file or directory
)

kapp: Error: waiting on reconcile packageinstall/demo (packaging.carvel.dev/v1alpha1) namespace: default:
  Finished unsuccessfully (Reconcile failed:  (message: ytt: Error: Checking file '/etc/kappctrl-mem-tmp/kapp-controller-fetch-template-deploy262513077/config': lstat /etc/kappctrl-mem-tmp/kapp-controller-fetch-template-deploy262513077/config: no such file or directory
))

I tried removing the ytt section from Package resource, but still facing the same error. I'm not using ytt anywhere for templating

@troll-warlord troll-warlord added the carvel-triage This issue has not yet been reviewed for validity label Jun 25, 2024
@praveenrewar
Copy link
Member

      fetch:
      - imgpkgBundle:
          image: registry.com/app1:1.0.0
      - imgpkgBundle:
          image: registry.com/app2:1.0.0

@troll-warlord You seem to having multiple fetch steps, could you share your use case around this?

When you have multiple fetch steps, the contents would be in different directories (by default they are indexed 0, 1, 2...) but they can also be named.
For example, you can do something like this:

      fetch:
      - imgpkgBundle:
          image: registry.com/app1:1.0.0
         path: app-1
      - imgpkgBundle:
          image: registry.com/app2:1.0.0
         path: app-2
      template:
      - ytt:
          paths:
          - app-1/config/
      - kbld:
          paths:
          - '-'
          - app-1/.imgpkg/images.yml

@troll-warlord
Copy link
Author

@praveenrewar i was actually trying to bundle multiple applications in same package.

@praveenrewar
Copy link
Member

@troll-warlord Any specific reason you want to bundle multiple applications in the same package? Do they work together? Like one of them depends on the other?
Currently, folks use the concept of "meta package" to install multiple package at once. Basically, the meta package just consists of package installs for the different packages that you want to install.
We are also going to work on dependencies in future, where one package can specify another package as a dependency and kapp-controller would ensure that all the dependencies are installed before a package is installed.

@praveenrewar praveenrewar added discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution and removed carvel-triage This issue has not yet been reviewed for validity labels Jul 1, 2024
@praveenrewar
Copy link
Member

@troll-warlord I am closing this issue, feel free to open it if you have more questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue is not a bug or feature and a conversation is needed to find an appropriate resolution
Projects
Archived in project
Development

No branches or pull requests

2 participants