๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
IT-Engineering/TroubleShooting

Singularity - cached file hash and expected hash does not match ๋ฌธ์ œ ํ•ด๊ฒฐ

by ๐Ÿงž‍โ™‚๏ธ 2021. 10. 3.
๋ฐ˜์‘ํ˜•
singularity pull library://lolcow

์œ„์˜ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ–ˆ์„ ๋•Œ ์•„๋ž˜์™€ ๊ฐ™์ด ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค. error fetching image๋กœ ์‹œ์ž‘ํ•˜๋Š” ๋ถ€๋ถ„์ด๋‹ค. cached file hash and expected hash does not match๋ผ๊ณ  ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๊ณ  ์žˆ๋‹ค.

INFO:    Downloading library image
639.0b / ??? [===================================================]  927.9 KiB/s 
FATAL:   While pulling library image: error fetching image: cached file hash(sha256.74c12dc5a0e309a82b73ac30eeedfb9f9af2c43c3dd9560476db63a9df61eac9) and expected hash(sha256.2175ac94c763b1b3e0982cff4d0c9f73e8586d9e226c5311faa43629578f57b8) does not match

 

ํ˜น์€

singularity --debug run library://sylabsed/examples/lolcow

์ด ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ด๋„ ์•„๋ž˜์™€ ๊ฐ™์ด ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค.

DEBUG   [U=1000,P=17589]   persistentPreRun()            Singularity version: 3.8.1
DEBUG   [U=1000,P=17589]   persistentPreRun()            Parsing configuration file /usr/local/etc/singularity/singularity.conf
DEBUG   [U=1000,P=17589]   handleConfDir()               /home/sky/.singularity already exists. Not creating.
DEBUG   [U=1000,P=17589]   getCacheParentDir()           environment variable SINGULARITY_CACHEDIR not set, using default image cache
DEBUG   [U=1000,P=17589]   apiGet()                      apiGet calling v1/images/sylabsed/examples/lolcow:latest?arch=amd64
INFO    [U=1000,P=17589]   pull()                        Downloading library image
DEBUG   [U=1000,P=17589]   DownloadImage()               Pulling from URL: v1/imagefile/sylabsed/examples/lolcow:latest
DEBUG   [U=1000,P=17589]   DownloadImage()               OK response received, beginning body download
639.0b / ??? [===================================================]  692.0 KiB/s 
DEBUG   [U=1000,P=17589]   DownloadImage()               Download complete
FATAL   [U=1000,P=17589]   replaceURIWithImage()         Unable to handle library://sylabsed/examples/lolcow uri: cached file hash(sha256.74c12dc5a0e309a82b73ac30eeedfb9f9af2c43c3dd9560476db63a9df61eac9) and expected hash(sha256.e37e11f101a9db82a08bf63f816219da0d4da0e19f5323761d92731213c9e751) does not match

์ด ๊ฒฝ์šฐ์—๋„ Unable to handle library๋กœ ์‹œ์ž‘ํ•˜์—ฌ cached file hash and expected hash does not match ๋ผ๋Š” ์—๋Ÿฌ๋ฅผ ๋ณด์—ฌ์ฃผ๊ณ  ์žˆ๋‹ค.

์–ธ๋œป ๋ณด์•„๋„ ๊ฐ™์€ ์ข…๋ฅ˜์˜ ์—๋Ÿฌ๋กœ ๋ณด์ธ๋‹ค. ๋งจ ์œ„์˜ ์‹คํ–‰๋ช…๋ น์„ ์•„๋ž˜์™€ ๊ฐ™์ด ์ž…๋ ฅํ•˜์—ฌ cache ๋ถ€๋ถ„์˜ ์ถฉ๋Œ์„ ํ”ผํ•ด์ฃผ๋ฉด ๋ฌธ์ œ๊ฐ€ ํ•ด๊ฒฐ๋œ๋‹ค. ๋ฌธ์ œ ๋ฐœ์ƒ์›์ธ์ด cache์™€ ๊ด€๋ จ์ด ์žˆ์ง€๋งŒ, ํ•ญ์ƒ ์ด๋Ÿฐ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š”์ง€๋Š” ๋ชจ๋ฅด๊ฒ ๋‹ค. ๋‚ด ๊ฒฝ์šฐ์—” ๊ทธ๋žฌ๋‹ค.

singularity pull --disable-cache library://lolcow

ํ•ต์‹ฌ์€ --disable-cache์ด๋‹ค. ์ด ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์—๋Ÿฌ๋ฅผ ์‚ด์ง ํ”ผํ•ด๊ฐˆ ์ˆ˜ ์žˆ์—ˆ๋‹ค.

๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€