[Bug]: S3 objects from previous storage use not detected as orphans

Aperta
#66,476 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
aws, php
Ambito
backend, databases

Direzione di ricerca

Start by tracing the occ files:object:list and occ files:object:orphans commands and how the primary S3 object store distinguishes indexed objects from orphans. Reproduce the reported sequence using an S3 bucket previously attached as external storage, then compare the file and orphan listings. Done means the old objects no longer appear as files and are reported as orphans.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

0. Needs triage 35-feedback bug
⚠️ This issue respects the following points: ⚠️
  • This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
  • This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
  • I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
  • I agree to follow Nextcloud's Code of Conduct.
  • I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.
Bug description

Certain irregularities emerge if an S3 bucket has previously been used for external storage, and then later is used for primary storage.

In particular, objects from the previous storage use are not detected as orphans.

Steps to reproduce
  1. Create a new S3 bucket, on whichever provider is being used.
  2. Attach the bucket as external storage.
  3. Add files to the external storage.
  4. Detach the bucket as external storage.
  5. (Optional) Generate a raw listing of the objects in the bucket, using a suitable tool, such as Cyberduck, Rclone, or s3cmd.
  6. Attach the same bucket as primary storage.
  7. List files in primary storage, using occ files:object:list.
  8. List orphans in the primary storage, using occ files:object:orphans.

The preexisting objects are not detected as orphans, while they are included in the file list (but not presented as files exposed to the user).

Expected behavior

The file list should not include entries corresponding to the files added when the bucket was attached as external storage. Further, the orphan list should include such entries.

Nextcloud Server version

35

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.5

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***removed***"
        ],
        "dbtype": "mysql",
        "version": "35.0.2.2",
        "overwrite.cli.url": "***removed***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "default_phone_region": "***removed**",
       "objectstore": {
            "class": "OC\\Files\\ObjectStore\\S3",
            "arguments": {
                "bucket": "***removed***",
                "autocreate": false,
                "key": "***REMOVED SENSITIVE VALUE***",
                "secret": "***REMOVED SENSITIVE VALUE***",
                "hostname": "***removed***",
                "port": 443,
                "use_ssl": true,
                "region": "***removed***",
                "use_path_style": false
            }
        },
        "app_install_overwrite": []
    }
}
List of activated Apps
Enabled:
  - activity: 8.0.0
  - app_api: 35.0.0
  - appstore: 2.0.0
  - bruteforcesettings: 8.0.0
  - circles: 35.0.0
  - cloud_federation_api: 2.0.0
  - comments: 2.0.0
  - contactsinteraction: 2.0.0
  - dashboard: 8.0.0
  - dav: 2.0.0
  - federatedfilesharing: 2.0.0
  - federation: 2.0.0
  - files: 3.0.0
  - files_downloadlimit: 5.3.0
  - files_external: 2.0.0
  - files_lock: 35.0.1
  - files_pdfviewer: 8.0.0
  - files_reminders: 2.0.0
  - files_sharing: 2.0.0
  - files_trashbin: 2.0.0
  - files_versions: 2.0.0
  - firstrunwizard: 8.0.0
  - logreader: 8.0.0
  - lookup_server_connector: 2.0.0
  - nextcloud_announcements: 7.0.0
  - notifications: 8.0.1
  - oauth2: 2.0.0
  - office: 1.1.0
  - password_policy: 7.0.0
  - photos: 8.0.0
  - privacy: 7.0.0
  - profile: 2.0.0
  - provisioning_api: 2.0.0
  - recommendations: 8.0.0
  - related_resources: 6.0.0
  - serverinfo: 7.0.0
  - settings: 2.0.0
  - sharebymail: 2.0.0
  - sharing: 1.0.4
  - support: 7.0.0
  - survey_client: 7.0.0
  - systemtags: 2.0.0
  - text: 9.0.1
  - theming: 3.0.0
  - twofactor_backupcodes: 2.0.0
  - twofactor_totp: 17.1.0
  - updatenotification: 2.0.0
  - user_status: 2.0.0
  - viewer: 8.0.0
  - weather_status: 2.0.0
  - webhook_listeners: 2.0.0
  - workflowengine: 3.0.0
Disabled:
  - admin_audit: 2.0.0
  - encryption: 3.0.1
  - suspicious_login: 13.0.0
  - twofactor_nextcloud_notification: 9.0.0
  - user_ldap: 2.0.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs

Additional info

No response

Lingua principale
PHP
Stelle
37.5k
Fork
5.4k
Merge medio
1g 13h
PR unite (30g)
639

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nextcloud/server

Tutte le issue di nextcloud/server

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.