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

fix: skip the integrity check for nextcloud-init-sync.lock #48268

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

kesselb
Copy link
Contributor

@kesselb kesselb commented Sep 22, 2024

Summary

nextcloud-init-sync.lock is used by nextcloud/docker to prevent running the initialization script on multiple containers at the same time.

TODO

  • CI
  • Review

Checklist

@kesselb kesselb added bug 3. to review Waiting for reviews labels Sep 22, 2024
@kesselb kesselb added this to the Nextcloud 31 milestone Sep 22, 2024
@kesselb kesselb self-assigned this Sep 22, 2024
@kesselb
Copy link
Contributor Author

kesselb commented Sep 22, 2024

/backport to stable30

Copy link
Member

@joshtrichards joshtrichards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine. Though I'm mystified: why this wasn't a problem previously? It should have been a problem all along. I guess now the integrity checker is behaving how I'd expect, but I'm not sure why. 😆 The main change was #46174.

EDIT: Comparison of v29 versus v30 behavior below (empty files seem to be getting treated differently for whatever reason)

'.rnd',
'.webapp', // Gentoo/Funtoo & derivatives use a tool known as webapp-config to manage web-apps.
'Thumbs.db', // Microsoft Windows
'nextcloud-init-sync.lock ' // Used by nextcloud/docker to prevent running the initialization script on multiple containers at the same time: https://github.com/nextcloud/docker/issues/2299.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'nextcloud-init-sync.lock ' // Used by nextcloud/docker to prevent running the initialization script on multiple containers at the same time: https://github.com/nextcloud/docker/issues/2299.
'nextcloud-init-sync.lock' // Used by nextcloud/docker to prevent running the initialization script on multiple containers at the same time: https://github.com/nextcloud/docker/issues/2299.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, well spotted 🙏

@joshtrichards
Copy link
Member

Somehow in <30 the integrity checker seemed to skip empty files I guess?

v29:

www-data@b0b680aa47f5:~/html$ ./occ integrity:check-core
www-data@b0b680aa47f5:~/html$ echo hello > hello 
www-data@b0b680aa47f5:~/html$ ./occ integrity:check-core
  - EXTRA_FILE:
    - hello:
      - expected: 
      - current: e7c22b994c59d9cf2b48e549b1e24666636045930d3da7c1acb299d1c3b7f931f94aae41edda2c2b207a36e10f8bcb8d45223e54878f5b316e7ce3b6bc019629
www-data@b0b680aa47f5:~/html$ touch empty
www-data@b0b680aa47f5:~/html$ ./occ integrity:check-core
  - EXTRA_FILE:
    - hello:
      - expected: 
      - current: e7c22b994c59d9cf2b48e549b1e24666636045930d3da7c1acb299d1c3b7f931f94aae41edda2c2b207a36e10f8bcb8d45223e54878f5b316e7ce3b6bc019629
www-data@b0b680aa47f5:~/html$ 

v30:

www-data@3155cc17714b:~/html$ ./occ integrity:check-core
  - EXTRA_FILE:
    - nextcloud-init-sync.lock:
      - expected: 
      - current: cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
www-data@3155cc17714b:~/html$ echo hello > hello
www-data@3155cc17714b:~/html$ ./occ integrity:check-core
  - EXTRA_FILE:
    - hello:
      - expected: 
      - current: e7c22b994c59d9cf2b48e549b1e24666636045930d3da7c1acb299d1c3b7f931f94aae41edda2c2b207a36e10f8bcb8d45223e54878f5b316e7ce3b6bc019629
    - nextcloud-init-sync.lock:
      - expected: 
      - current: cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
www-data@3155cc17714b:~/html$ touch empty
www-data@3155cc17714b:~/html$ ./occ integrity:check-core
  - EXTRA_FILE:
    - empty:
      - expected: 
      - current: cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
    - hello:
      - expected: 
      - current: e7c22b994c59d9cf2b48e549b1e24666636045930d3da7c1acb299d1c3b7f931f94aae41edda2c2b207a36e10f8bcb8d45223e54878f5b316e7ce3b6bc019629
www-data@3155cc17714b:~/html$ 

nextcloud-init-sync.lock is used by nextcloud/docker to prevent running the initialization script on multiple containers at the same time.

Ref: nextcloud/docker#2299.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb force-pushed the debt/noid/ignore-docker-image-lock-file branch from 28ed5f7 to 6e870c0 Compare September 22, 2024 15:48
@nickvergessen
Copy link
Member

Somehow in <30 the integrity checker seemed to skip empty files I guess?

The reason is another one, but yeah it skipped all empty ones.

@nickvergessen
Copy link
Member

/backport to stable30

@nickvergessen
Copy link
Member

/backport to stable29

@nickvergessen
Copy link
Member

/backport to stable28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nextcloud-init-sync.lock fails integrity check after 29->30
4 participants