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

Preheat successful, but does not appear to be working properly #1367

Closed
LetFu opened this issue Jun 9, 2022 · 4 comments · Fixed by #1375
Closed

Preheat successful, but does not appear to be working properly #1367

LetFu opened this issue Jun 9, 2022 · 4 comments · Fixed by #1375
Assignees

Comments

@LetFu
Copy link
Contributor

LetFu commented Jun 9, 2022

Bug report:

I used the preheat feature, and although the preheat was successful. But when I pulling the image, I found that the seedpeer node was still back to source and did not use the preheat cached data.

Expected behavior:

Pulling the image after a successful preheat will not perform a pull back to the source.

How to reproduce it:

Start with docekr-compose via the reference documentation

1. Create Task

Use console
image

2. View manager core.log

{"level":"info","ts":"2022-06-09 06:19:57.723","caller":"job/preheat.go:128","msg":"preheat https://registry-1.docker.io/v2/library/python/manifests/latest file url: https://registry-1.docker.io/v2/library/python/blobs/sha256:2767dbfeeb87f9bd53889a475797724caee223dd3d9eb6b7e088ab6c24971b99 queues: [scheduler_1_node0]"}
{"level":"info","ts":"2022-06-09 06:19:57.723","caller":"job/preheat.go:128","msg":"preheat https://registry-1.docker.io/v2/library/python/manifests/latest file url: https://registry-1.docker.io/v2/library/python/blobs/sha256:9d5e973c5e10aa521d82c2604eff33d9d6a01db8cabc2dd6c5ede7873cd4d714 queues: [scheduler_1_node0]"}
{"level":"info","ts":"2022-06-09 06:19:57.723","caller":"job/preheat.go:128","msg":"preheat https://registry-1.docker.io/v2/library/python/manifests/latest file url: https://registry-1.docker.io/v2/library/python/blobs/sha256:45f2aca7694f66817e68ee1def95117318cb16417bbfa6c5e4fdb7308cefd57d queues: [scheduler_1_node0]"}
{"level":"info","ts":"2022-06-09 06:19:57.723","caller":"job/preheat.go:128","msg":"preheat https://registry-1.docker.io/v2/library/python/manifests/latest file url: https://registry-1.docker.io/v2/library/python/blobs/sha256:1123e010bf8054349c6b2716c820a205c830588720a2626321d76d8200dfe8ca queues: [scheduler_1_node0]"}
{"level":"info","ts":"2022-06-09 06:19:57.727","caller":"job/preheat.go:166","msg":"create preheat group job successfully, group uuid: group_c71faca1-7d6c-4f64-b841-5409fb668342, urls: [https://registry-1.docker.io/v2/library/python/blobs/sha256:6bb8bdb609b697dfbb897199c2869bc47fcc9fbf7a7370494c42458e15244df9 https://registry-1.docker.io/v2/library/python/blobs/sha256:e756f3fdd6a378aa16205b0f75d178b7532b110e86be7659004fc6a21183226c https://registry-1.docker.io/v2/library/python/blobs/sha256:bf168a6748997eb97b48cc86234b7ff7d8bc907645b9be99013158b3f146b272 https://registry-1.docker.io/v2/library/python/blobs/sha256:e604223835ccf02d097187b5a58ca73e8598cadbb16a36202ca1943e97f56f1f https://registry-1.docker.io/v2/library/python/blobs/sha256:6d5c91c4cd86dde23108ab3af91e9eae838d0059a380ee7dfd4f370b6d985523 https://registry-1.docker.io/v2/library/python/blobs/sha256:2cc8d88542628a7668ee653a4c00f2cfef5f9ea24f407227b6b63508c56eba3e https://registry-1.docker.io/v2/library/python/blobs/sha256:2767dbfeeb87f9bd53889a475797724caee223dd3d9eb6b7e088ab6c24971b99 https://registry-1.docker.io/v2/library/python/blobs/sha256:9d5e973c5e10aa521d82c2604eff33d9d6a01db8cabc2dd6c5ede7873cd4d714 https://registry-1.docker.io/v2/library/python/blobs/sha256:45f2aca7694f66817e68ee1def95117318cb16417bbfa6c5e4fdb7308cefd57d https://registry-1.docker.io/v2/library/python/blobs/sha256:1123e010bf8054349c6b2716c820a205c830588720a2626321d76d8200dfe8ca]"}

3. View Data Catalog

(base) [root@node0 docker-compose]# docker exec seed-peer tree -hD /var/lib/dragonfly/
/var/lib/dragonfly/
├── [  71 Jun  9 06:45]  0a52b53a8e4d5412111e02b327d5c37eecb819e80ad3533104e813cf614f754d
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-a4410be5-455f-4242-b057-6d1a1e386f22_Seed
│       ├── [ 52M Jun  9 06:46]  data
│       └── [2.5K Jun  9 06:46]  metadata
├── [  71 Jun  9 06:45]  5e0b4f07688cf052d0d38afc3041a8ec22a81ee3a836e99a2416b6162aaa7ac2
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-7c981541-e1b2-4519-b9bf-875b151baced_Seed
│       ├── [ 10M Jun  9 06:45]  data
│       └── [1.0K Jun  9 06:45]  metadata
├── [  71 Jun  9 06:45]  902999501470f1c6d1d7dc49ed0d3dc8beeac33693f990224c0e1ac5983697a7
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-b9e69be0-ad75-45c6-95b3-0aaaa0955b25_Seed
│       ├── [ 19M Jun  9 06:45]  data
│       └── [1.3K Jun  9 06:45]  metadata
├── [  71 Jun  9 06:45]  95257d20a342fcefabc499a6276e2133118b2405b7b3a04739fedad0d03aba21
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-553bc38b-bbcd-4270-841d-1c70bf476a5d_Seed
│       ├── [6.0M Jun  9 06:45]  data
│       └── [ 925 Jun  9 06:45]  metadata
├── [  71 Jun  9 06:45]  c28b7a40cfa3d44d19496c00788df1675f7f749b985fe199a6680cb1f6b324cd
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-c9042176-908f-4970-8681-c0996e0b545e_Seed
│       ├── [ 233 Jun  9 06:45]  data
│       └── [ 779 Jun  9 06:45]  metadata
├── [  71 Jun  9 06:45]  cf072b8ca1d9b92496ede0565f72322209207e0b85f2c09dbee7e93a6d36e319
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-e34ba120-4385-411b-8fe4-6857a9340ae0_Seed
│       ├── [4.9M Jun  9 06:45]  data
│       └── [ 924 Jun  9 06:45]  metadata
├── [  71 Jun  9 06:45]  d0c1fe587b96d98f106a827f43c0667e9576f641117f81a09b543cca62ef9501
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-d30dba24-73f2-429d-831d-13c8f0c1026f_Seed
│       ├── [2.7M Jun  9 06:45]  data
│       └── [ 792 Jun  9 06:45]  metadata
├── [  71 Jun  9 06:45]  e0a1b35f47ba7cb403d7fce2c2ad439efcdaa2baeeb20d89b26cb48a2d0d2544
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-97dc71fb-d704-492a-8c63-eeb141ffc348_Seed
│       ├── [ 52M Jun  9 06:46]  data
│       └── [2.5K Jun  9 06:46]  metadata
├── [  71 Jun  9 06:45]  e2da9f4c46bf48a52023e1f48af5b7ec4fca17334ca0e66653ec7e6b9107c36a
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-9caf22fe-d4d4-405a-ae64-a2ac0aa6a83b_Seed
│       ├── [8.3K Jun  9 06:45]  data
│       └── [ 781 Jun  9 06:45]  metadata
└── [  71 Jun  9 06:45]  efe37b4654b073deef1aef2ff2e2978a39f74998d833e32cc890f940734e4ec5
    └── [  34 Jun  9 06:45]  172.20.163.12-1-085d1bc4-b508-4b9b-9386-e3c48cc228c3_Seed
        ├── [188M Jun  9 06:46]  data
        └── [7.0K Jun  9 06:46]  metadata

20 directories, 20 files

4. Pull image

crictl pull python:latest

5. Review Data Catalog

(base) [root@node0 docker-compose]# docker exec seed-peer tree -hD /var/lib/dragonfly/
/var/lib/dragonfly/
├── [  71 Jun  9 06:48]  007859f1cc160a28e9c5cfa8c52499284427abafe311b6898759ac42b4572fec
│   └── [  34 Jun  9 06:48]  172.20.163.12-1-f48615ec-1650-47b5-a549-f6644f941dd7_Seed
│       ├── [2.7M Jun  9 06:48]  data
│       └── [ 791 Jun  9 06:48]  metadata
├── [  71 Jun  9 06:48]  00b64f40b54a9a3f521caa8c631e37588ba4061f35e5e23ad748bf6fdc36eb14
│   └── [  34 Jun  9 06:48]  172.20.163.12-1-bb89dae5-03fa-4fc9-8f63-3e61c558277e_Seed
│       ├── [ 10M Jun  9 06:48]  data
│       └── [1.0K Jun  9 06:48]  metadata
├── [  71 Jun  9 06:45]  0a52b53a8e4d5412111e02b327d5c37eecb819e80ad3533104e813cf614f754d
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-a4410be5-455f-4242-b057-6d1a1e386f22_Seed
│       ├── [ 52M Jun  9 06:46]  data
│       └── [2.5K Jun  9 06:46]  metadata
├── [  71 Jun  9 06:48]  144737ad893a5b3a9694e8c124ade2ccf22c01a887e750deb8ad4226be256342
│   └── [  34 Jun  9 06:48]  172.20.163.12-1-c4b9e5f4-ee36-4b4a-b3c3-2e7c43203000_Seed
│       ├── [8.3K Jun  9 06:48]  data
│       └── [ 781 Jun  9 06:48]  metadata
├── [  71 Jun  9 06:48]  176cf97e951382307368deb0a081d25d0f480effad5e7b4c46192b2815a78cd2
│   └── [  34 Jun  9 06:48]  172.20.163.12-1-b6da61c9-4b54-4e8d-b92c-c73f5e7053ea_Seed
│       ├── [4.9M Jun  9 06:48]  data
│       └── [ 923 Jun  9 06:48]  metadata
├── [  71 Jun  9 06:48]  2334cf07b7e877d96140bfe4fd59a798c3d370e3ae6be901ea044871fae52717
│   └── [  34 Jun  9 06:48]  172.20.163.12-1-4e467399-c54e-4614-8016-9588cc558801_Seed
│       ├── [ 52M Jun  9 06:48]  data
│       └── [2.5K Jun  9 06:48]  metadata
├── [  71 Jun  9 06:45]  5e0b4f07688cf052d0d38afc3041a8ec22a81ee3a836e99a2416b6162aaa7ac2
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-7c981541-e1b2-4519-b9bf-875b151baced_Seed
│       ├── [ 10M Jun  9 06:45]  data
│       └── [1.0K Jun  9 06:45]  metadata
├── [  71 Jun  9 06:48]  6434431a0f8e1dd257c62c7b81027babe36bd7895bef7430a117ee2255fd444d
│   └── [  34 Jun  9 06:48]  172.20.163.12-1-bdf76c24-07e2-47d1-b6bd-62f24b82f91d_Seed
│       ├── [ 52M Jun  9 06:48]  data
│       └── [2.5K Jun  9 06:48]  metadata
├── [  71 Jun  9 06:48]  82524546509c682b2235eef401ef080e61deece702c8bd3641054610b598413e
│   └── [  34 Jun  9 06:48]  172.20.163.12-1-1a50baa6-6158-4135-86d2-121623f213a7_Seed
│       ├── [ 19M Jun  9 06:48]  data
│       └── [1.3K Jun  9 06:48]  metadata
├── [  71 Jun  9 06:48]  826ceda049e5498b3ebe4091ebc0d53ce6243a20d397ec8bb754d947dd360e2f
│   └── [  34 Jun  9 06:48]  172.20.163.12-1-ac47c650-c569-4c6c-8ecc-0efffe13a0cb_Seed
│       ├── [ 233 Jun  9 06:48]  data
│       └── [ 779 Jun  9 06:48]  metadata
├── [  71 Jun  9 06:45]  902999501470f1c6d1d7dc49ed0d3dc8beeac33693f990224c0e1ac5983697a7
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-b9e69be0-ad75-45c6-95b3-0aaaa0955b25_Seed
│       ├── [ 19M Jun  9 06:45]  data
│       └── [1.3K Jun  9 06:45]  metadata
├── [  71 Jun  9 06:45]  95257d20a342fcefabc499a6276e2133118b2405b7b3a04739fedad0d03aba21
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-553bc38b-bbcd-4270-841d-1c70bf476a5d_Seed
│       ├── [6.0M Jun  9 06:45]  data
│       └── [ 925 Jun  9 06:45]  metadata
├── [  71 Jun  9 06:48]  b48fe2cb45b8a916109118fdf27e7baa7833ffcaa8b0edfb2e7d742e7aa2bfbf
│   └── [  34 Jun  9 06:48]  172.20.163.12-1-e70a00f9-d87a-4e83-beb4-74ae3204a14f_Seed
│       ├── [6.0M Jun  9 06:48]  data
│       └── [ 924 Jun  9 06:48]  metadata
├── [  71 Jun  9 06:45]  c28b7a40cfa3d44d19496c00788df1675f7f749b985fe199a6680cb1f6b324cd
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-c9042176-908f-4970-8681-c0996e0b545e_Seed
│       ├── [ 233 Jun  9 06:45]  data
│       └── [ 779 Jun  9 06:45]  metadata
├── [  71 Jun  9 06:45]  cf072b8ca1d9b92496ede0565f72322209207e0b85f2c09dbee7e93a6d36e319
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-e34ba120-4385-411b-8fe4-6857a9340ae0_Seed
│       ├── [4.9M Jun  9 06:45]  data
│       └── [ 924 Jun  9 06:45]  metadata
├── [  71 Jun  9 06:45]  d0c1fe587b96d98f106a827f43c0667e9576f641117f81a09b543cca62ef9501
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-d30dba24-73f2-429d-831d-13c8f0c1026f_Seed
│       ├── [2.7M Jun  9 06:45]  data
│       └── [ 792 Jun  9 06:45]  metadata
├── [  71 Jun  9 06:48]  dd490f861e1461ee60fc8b14282ea11daad5cf22ec0cce731c1b6a13989f9317
│   └── [  34 Jun  9 06:48]  172.20.163.12-1-3d361df9-471e-445a-a7db-c9fb01b5cb05_Seed
│       ├── [188M Jun  9 06:49]  data
│       └── [7.0K Jun  9 06:49]  metadata
├── [  71 Jun  9 06:45]  e0a1b35f47ba7cb403d7fce2c2ad439efcdaa2baeeb20d89b26cb48a2d0d2544
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-97dc71fb-d704-492a-8c63-eeb141ffc348_Seed
│       ├── [ 52M Jun  9 06:46]  data
│       └── [2.5K Jun  9 06:46]  metadata
├── [  71 Jun  9 06:45]  e2da9f4c46bf48a52023e1f48af5b7ec4fca17334ca0e66653ec7e6b9107c36a
│   └── [  34 Jun  9 06:45]  172.20.163.12-1-9caf22fe-d4d4-405a-ae64-a2ac0aa6a83b_Seed
│       ├── [8.3K Jun  9 06:45]  data
│       └── [ 781 Jun  9 06:45]  metadata
└── [  71 Jun  9 06:45]  efe37b4654b073deef1aef2ff2e2978a39f74998d833e32cc890f940734e4ec5
    └── [  34 Jun  9 06:45]  172.20.163.12-1-085d1bc4-b508-4b9b-9386-e3c48cc228c3_Seed
        ├── [188M Jun  9 06:46]  data
        └── [7.0K Jun  9 06:46]  metadata

40 directories, 40 files

Request log

I see that the taskID generated by preheat and pulling the image is different, I do not know if it is related to this.

Preheat log in scheduler
{
	"level": "info",
	"ts": "2022-06-09 03:59:55.455",
	"caller": "job/job.go:167",
	"msg": "preheat https://registry-1.docker.io/v2/library/python/blobs/sha256:20cadc1653dfac9f6409b072a776240c529c275775c56c5600c5b7b877512319 head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co_Up-gd05irCHYcxkdY2hKrlBGvlht53L7-zvT9IEsSuEqONDwxuflF4mPXiOGDKuxxovgPePlQMg\"}, tag: , range: , filter: , digest: sha256:20cadc1653dfac9f6409b072a776240c529c275775c56c5600c5b7b877512319",
	"taskID": "8d8cb5e458fa7fd23ef0059e3dc6b9402a73374678f05dd17a5b19d50af7e011",
	"url": "https://registry-1.docker.io/v2/library/python/blobs/sha256:20cadc1653dfac9f6409b072a776240c529c275775c56c5600c5b7b877512319"
}
Pull image peer task log
request overview, 
pid: 172.20 .163 .80 - 1 - 74 ffb37e - 3 ac9 - 4 c67 - 90e3 - b350cae6d764,
url: https: //registry-1.docker.io/v2/library/python/blobs/sha256:20cadc1653dfac9f6409b072a776240c529c275775c56c5600c5b7b877512319?ns=docker.io,
filter: Expires&Signature,
tag: d7y/proxy,
range: ,
digest: ,
header: map[string]string{\
	"Accept\":\"application/vnd.docker.image.rootfs.diff.tar.gzip, */*\", \"Authorization\":\"Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsIng1YyI6WyJNSUlDK1RDQ0FwK2dBd0lCQWdJQkFEQUtCZ2dxaGtqT1BRUURBakJHTVVRd1FnWURWUVFERXp0U1RVbEdPbEZNUmpRNlEwZFFNenBSTWtWYU9sRklSRUk2VkVkRlZUcFZTRlZNT2taTVZqUTZSMGRXV2pwQk5WUkhPbFJMTkZNNlVVeElTVEFlRncweU1qQXhNVEF5TWpJeE5EbGFGdzB5TXpBeE1qVXlNakl4TkRsYU1FWXhSREJDQmdOVkJBTVRPMUJaUTFJNlNWQmFRanBJUWxGWE9qZE1SVms2UWtGV1FqcEhTRGRhT2xWSVZ6TTZVa3RMVWpwRE4wNHpPbGxOTkZJNlNWaE5TRHBLVkZCQ01JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBbE5JOGFtMlBERnZzNndOeVl2d0dkZWZXVXJXQWdMZ3N2MzA2MnZycG5VNkN0WUpEZDZ2K2NE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MCJ9fV0sImF1ZCI6InJlZ2lzdHJ5LmRvY2tlci5pbyIsImV4cCI6MTY1NDc0NzkxNCwiaWF0IjoxNjU0NzQ3NjE0LCJpc3MiOiJhdXRoLmRvY2tlci5pbyIsImp0aSI6IjNOQXF0V1d6aGtDSUNhRWtxM3VSIiwibmJmIjoxNjU0NzQ3MzE0LCJzdWIiOiIifQ.ewSZ7_L0-p1oJZRQW6dzWz2SmN9fqgUDMQ_whm8WcFoox-IyGVKdHPt1WJYz55Zf0Z20XVgZ9ZFhiZ1Qr5eoU7YXCHPmS757U8sbLyQvQe8Its_pI2duc0Im_9kvFOtkdAsHzMeo__3fl5UpkxndO43xsSvIDxUaMakXqM-T6sik5wwKLjghTzUuCVJIHd-q6iBVZ-PTUu_f-lxQTtKGgA2Wl4Jlw0ySN_hl1c05E3ggY8qOkV7c6U8lRcMIdbTrivFc7UxsYB7JfphwDefc5WRWuBNlCeV5lF_JBv94APGWgwbPhHqDLaRiWxuGg0frwJgadwFGjL7NV5KTrJIAjQ\", \"X-Dragonfly-Registry\":\"https://registry-1.docker.io\"}",
	"peer": "172.20.163.80-1-74ffb37e-3ac9-4c67-90e3-b350cae6d764",
	"task": "bc2c0c5534676d279206f312adb6a606d92a694dac2cab24f31be168ae9fa8d0",
	"component": "PeerTask",
	"trace": "fedab6b535036dad77f1426f610f4420"
}

Finally

I can also see the traffic on the external network with the iftop command when I pull the image.
Or maybe I made a configuration error, i would be grateful for any tips on how to proceed.

Thanks!

Environment:

  • Dragonfly version: v2.0.3
  • Image info:
dragonflyoss/dfdaemon    v2.0.3     caa7ecf62a92   2 days ago    51.3MB
dragonflyoss/manager     v2.0.3     2c7ec0b598b6   2 days ago    99.8MB
dragonflyoss/scheduler   v2.0.3     33f098ec825f   2 days ago    69.1MB
  • OS: cenos7
  • Kernel (e.g. uname -a): Linux node0 5.4.156-1.el7.elrepo.x86_64
  • Others:
@LetFu LetFu added the kind/bug label Jun 9, 2022
@LetFu
Copy link
Contributor Author

LetFu commented Jun 9, 2022

When I deleted the line: https://github.com/dragonflyoss/Dragonfly2/blob/v2.0.3/scheduler/job/job.go#L154
And edit dfdaemon config proxy.defaultFilter to 'Expires&Signature&ns'
Then I run this command:

curl --location --request POST 'http://xx.xx.xx.xx:8080/api/v1/jobs' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "preheat",
    "args": {
        "type": "image",
        "url": "https://registry-1.docker.io/v2/library/python/manifests/3.6",
        "tag": "d7y/proxy"
    }
}'

When the number of seedpeer is 1, looks like it's working properly.

@gaius-qi gaius-qi self-assigned this Jun 10, 2022
@LetFu
Copy link
Contributor Author

LetFu commented Jun 10, 2022

Preheat with the following command:

curl --location --request POST 'http://101.42.243.65:30808/api/v1/jobs' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "preheat",
    "args": {
        "type": "image",
        "url": "https://registry-1.docker.io/v2/bitnami/golang/manifests/1.18.3",
        "tag": "d7y/proxy"
    }
}'

After preheating is complete. On host1, run the following command to pull the image.
Since the manager's and redis's address is on the public network, I changed the address of the manager and redis in the log to xx.xx.xx.xx. I hope this doesn't affect your view.

crictl pull golang:1.18.3

The logs are as follows, the scheduler cluster has three schedulers, and the seedpeer cluster has one seedpeer.
dfdaemon-host1.log
scheduler-host0.log
scheduler-node0.log
scheduler-node1.log
seed-peer-node2.log

Thank you very much for your help!

@gaius-qi
Copy link
Member

I will fix this issue, thx.

@gaius-qi gaius-qi linked a pull request Jun 13, 2022 that will close this issue
8 tasks
@gaius-qi
Copy link
Member

gaius-qi commented Jun 13, 2022

I have removed digest when calculating the task id and completed the continerd documentation.

If the client is containerd, it is recommended to configure proxy.defaultFilter in dfget.yaml and set it to Expires&Signature&ns, because containerd will add ns query params to the blobs download URL, refer to containerd/remotes/docker/resolver.go. Which will cause the generated Task ID to be different from the preheat Task ID, so it is impossible to hit the preheat blobs.

# proxy service detail option
proxy:
  defaultFilter: 'Expires&Signature&ns'

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

Successfully merging a pull request may close this issue.

2 participants