-
Notifications
You must be signed in to change notification settings - Fork 188
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
When Tern executes fs_hash.sh, it cannot cd to the contents directory. #430
Comments
Hello!
Thanks for trying tern out! I can recreate this issue and will debug it today. Would you mind filing an issue on GitHub for this?
Nisha Kumar
Open Source Engineer
VMware Open Source Technology Center
On Aug 30, 2019, at 12:07 AM, Katsunori Fukui <[email protected]<mailto:[email protected]>> wrote:
Hello, Tern Team.
When I tried to analyze the "yarara / base: v1" image, Tern output the following error.
Tern can't use command's "cd".
Is it my environmental problem or the Tern specification problem?
Problem Statement
When Tern executes fs_hash.sh, it cannot cd to the contens directory.
To Reproduce
`
vagrant@ubuntu-bionic:~$ tern -l -k report -i yarara/base:v1
fatal: not a git repository (or any of the parent directories): .git
2019-08-30 06:46:33,865 - DEBUG - main - Starting...
2019-08-30 06:46:33,866 - DEBUG - report - Setting up...
2019-08-30 06:46:33,866 - DEBUG - container - Checking if image "yarara/base:v1" is available on disk...
2019-08-30 06:46:33,871 - DEBUG - container - Attempting to pull image "yarara/base:v1"
2019-08-30 06:46:56,728 - DEBUG - container - Image "yarara/base:v1" downloaded
2019-08-30 06:47:05,844 - DEBUG - rootfs - Running command: sudo /usr/local/lib/python3.6/dist-packages/tern/tools/fs_hash.sh /home/vagrant/temp/3bf9dc6ca1042e8f1e9ce7b6a62bbe1ea0c224323b6fbc34e5e5e35905cd4206/contents
2019-08-30 06:47:08,952 - ERROR - rootfs - Command failed. /usr/local/lib/python3.6/dist-packages/tern/tools/fs_hash.sh: 22: cd: can't cd to /home/vagrant/temp/3bf9dc6ca1042e8f1e9ce7b6a62bbe1ea0c224323b6fbc34e5e5e35905cd4206/contents
2019-08-30 06:47:08,953 - WARNING - report - Cannot retrieve full image metadata
2019-08-30 06:47:08,953 - DEBUG - report - Teardown...
2019-08-30 06:47:08,954 - DEBUG - rootfs - Running command: sudo rm -rf temp/mergedir
2019-08-30 06:47:08,965 - DEBUG - rootfs - Running command: sudo rm -rf temp/workdir
2019-08-30 06:47:08,975 - DEBUG - main - Report completed.
2019-08-30 06:47:08,976 - DEBUG - main - Finished
`
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fvmware%2Ftern%2Fissues%2F430%3Femail_source%3Dnotifications%26email_token%3DAAHWBKSTTWKPETN7UBU3YW3QHDBLVA5CNFSM4ISKAUNKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HIL7I2Q&data=02%7C01%7Cnishak%40vmware.com%7C03008fea30964948cfe608d72d18be1e%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637027456624256362&sdata=ukySOtizUhTTRzEF1msw8cfdT7J20LOIyGx2aZEQVyM%3D&reserved=0>, or mute the thread<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAHWBKSA67ZOPEVLA62LKU3QHDBLVANCNFSM4ISKAUNA&data=02%7C01%7Cnishak%40vmware.com%7C03008fea30964948cfe608d72d18be1e%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637027456624256362&sdata=Ndlzeo2KijeKVfvWU0hepc98Pt5IwNoxo%2BnOmclo2hE%3D&reserved=0>.
|
Python3.7's |
Yes, |
@Katsunori04 it looks like the image you are using is corrupted. See tar error below.
What happened was that the first layer that tern hit was an empty tarfile, and because of this, tar exited with no error but because nothing was extracted it failed. Meanwhile, I think the image you have used is corrupted. |
What was the other image you used? |
@nishakm ubuntu:14.04 |
OK, the issue with the |
@nishakm I feel this is not a corruption error. However, the contents of the tarfile are missing. Is this issue affected by # 226? To Reproduce
|
@Katsunori04 I'm not sure about the status of the images you are testing here, but if the contents of the tarfile are missing, tern can't give you any information anyway. #226 will add extra error messages informing as such but the script will exit out gracefully with no information. |
Hello, Tern Team.
When I tried to analyze the "yarara / base: v1" image, Tern output the following error.
Tern can't use command's "cd".
Is it my environmental problem or the Tern specification problem?
Problem Statement
When Tern executes fs_hash.sh, it cannot cd to the contens directory.
To Reproduce
The text was updated successfully, but these errors were encountered: