Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

I can't clean files that don't belong to me using the -c parameter #5182

Open PPX888 opened 1 month ago

PPX888 commented 1 month ago

workerID 23 bucket 11 I had some files on my server that didn't belong to me, and I added the -c parameter to the storage node startup configuration, but the number and size of the files didn't change, and the storage service became unstable. After the -c parameter is removed, the server recovers. I also tried using storage-node util:cleanup, but it didn't work either.

nano /root/joystream/docker-compose.yml

  storage:
    image: joystream/storage-node:${COLOSSUS_VERSION}
    container_name: storage
    restart: unless-stopped
    volumes:
      - ${DATA_FOLDER}:/data
      - ${KEY_FOLDER}:/keystore
      - ${LOG_FOLDER}:/logs
      - ${ENDPOINT}:/joystream/storage-node/runner.sh:ro
    working_dir: /joystream/storage-node
    ports:
      - 3333:3333
    env_file:
      - .env
    environment:
      ENABLE_TELEMETRY: ${ENABLE_TELEMETRY:-no}
      OTEL_RESOURCE_ATTRIBUTES: service.name=colossus,deployment.environment=production
      NODE_ENV: ${NODE_ENV}
    entrypoint: ['/joystream/storage-node/runner.sh']
    command: [
      'server',
      '--worker=${COLOSSUS_1_WORKER_ID}',
      '--port=3333',
      '--uploads=/data',
      **'-c',**
      '--sync',
      '--syncInterval=10',
      '--syncWorkersNumber 20',
      '--storageSquidEndpoint ${STORAGESQUIDENDPOINT}',
      '--apiUrl=${JOYSTREAM_NODE_WS}',
docker logs -f storage --tail 100

355277821-a888cc65-021d-40ff-b1fa-1b39779ca09c

root@js-fb:~/joystream-cli# yarn run storage-node util:cleanup -b 11 -w 23 -d /data --password=X -k /root/keys/storage-role-key.json
yarn run v1.22.19
$ /root/joystream-cli/node_modules/.bin/storage-node util:cleanup -b 11 -w 23 -d /data --password=X -k /root/keys/storage-role-key.json
2024-07-28 11:17:37:1737 info: Adding key from /root/keys/storage-role-key.json
2024-07-28 11:17:38:1738 info: Initializing runtime connection to: ws://localhost:9944
2024-07-28 11:17:38:1738 info: Waiting for chain to be synced before proceeding.
2024-07-28 11:17:38:1738 info: Cleanup...
2024-07-28 11:17:38:1738 info: Started cleanup service...
2024-07-28 11:17:39:1739 debug: Sync - getting all storage buckets: offset = 0, limit = 1000
2024-07-28 11:18:15:1815 debug: Cleanup - pruning 0 obsolete objects
2024-07-28 11:18:15:1815 info: Cleanup ended.
Done in 254.21s.
root@js-fb:~/joystream-cli# du -sh /data
67T     /data
root@js-fb:~/joystream-cli#