dragonflyoss / Dragonfly2

Dragonfly is an open source P2P-based file distribution and image acceleration system. It is hosted by the Cloud Native Computing Foundation (CNCF) as an Incubating Level Project.
https://d7y.io
Apache License 2.0
2.27k stars 291 forks source link

dfdaemon does not use local cache, all request proxy to harbor #1956

Closed walleliu1016 closed 1 year ago

walleliu1016 commented 1 year ago

dragonfly version: v2.0.9-alpha.2 the dfdaemon config as fellow:

aliveTime: 0s
gcInterval: 1m0s
workHome: "/data/dfdaemon/workdir"
cacheDir: "/data/dfdaemon/cache"
logDir: "/data/app/dfdaemon/logs"
dataDir: "/data/dfdaemon/data"
pluginDir: "/data/dfdaemon/plugin"
keepStorage: true
console: false
verbose: true
pprof-port: -1
jaeger: ""
scheduler:
  manager:
    enable: true
    netAddrs:
      - type: tcp
        addr: 1.1.1.1:65003
        refreshInterval: 10s
    seedPeer:
      enable: true
      type: super
      clusterID: 1
      keepAlive:
        internal: 5s
  scheduleTimeout: 30s
  disableAutoBackSource: false
host:
  advertiseIP: '1.1.1.1'
  location: 'PT'
  idc: 'UAT'
  securityDomain: ''
  netTopology: ''
  hostname: '1.1.1.1'
download:
  calculateDigest: true
  totalRateLimit: 2048Mi
  perPeerRateLimit: 1024Mi
  pieceDownloadTimeout: 30s
  prefetch: false
  transportOption:
    dialTimeout: 2s
    keepAlive: 30s
    maxIdleConns: 100
    idleConnTimeout: 90s
    responseHeaderTimeout: 2s
    tlsHandshakeTimeout: 1s
    expectContinueTimeout: 2s
  concurrent:
    thresholdSize: 10M
    thresholdSpeed: 2M
    goroutineCount: 4
    initBackoff: 0.5
    maxBackoff: 3
    maxAttempts: 3
  downloadGRPC:
    security:
      insecure: true
      cacert: ''
      cert: ''
      key: ''
      tlsVerify: true
      tlsConfig: null
    unixListen:
      socket: '/data/dfdaemon/dfdaemon.sock'
  peerGRPC:
    security:
      insecure: true
      cacert: ''
      cert: ''
      key: ''
      tlsVerify: true
    tcpListen:
      port: 65006
upload:
  rateLimit: 2048Mi
  security:
    insecure: true
    cacert: ''
    cert: ''
    key: ''
    tlsVerify: false
  tcpListen:
    port: 65008
objectStorage:
  enable: false
  filter: 'Expires&Signature&ns'
  maxReplicas: 3
  security:
    insecure: true
    tlsVerify: true
  tcpListen:
    port: 65004
storage:
  taskExpireTime: 6h
  strategy: io.d7y.storage.v2.simple
  diskGCThreshold: 300Gi
  diskGCThresholdPercent: 80
  multiplex: true
health:
  security:
    insecure: true
    cacert: ''
    cert: ''
    key: ''
    tlsVerify: false
  tcpListen:
    path: /server/ping
    listen: 0.0.0.0
    port: 40902
proxy:
  defaultFilter: 'Expires&Signature&ns'
  defaultTag: ''
  security:
    insecure: true
    cacert: ''
    cert: ''
    key: ''
    tlsVerify: false
  tcpListen:
    namespace: ''
    listen: 0.0.0.0
    port: 80
  registryMirror:
    dynamic: true
    url: http://uat.harbor.com
    insecure: true
    certs: []
    direct: false
    useProxies: false
  proxies:
    - regx: blobs/sha256.*
    - regx: file-server.*
    - regx: some-registry/
      useHTTPS: true
    - regx: no-proxy-reg
      direct: true
    - regx: some-registry
      redirect: another-registry
    - regx: ^http://some-registry/(.*)
      redirect: http://another-registry/$1

  hijackHTTPS:
    cert: ""
    key: ""
    hosts:
      - regx: mirror.aliyuncs.com:443
        insecure: true
        certs: []
  maxConcurrency: 0
  whiteList:
    - host: ""
      regx: ".*"
      ports:
security:
  autoIssueCert: false
  caCert: ''
  tlsVerify: false
  tlsPolicy: 'prefer'
  certSpec:
    validityPeriod: 4320h
network:
  enableIPv6: false
gaius-qi commented 1 year ago

Please provide dfdaemon logs and scheduler logs.