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

Image build timestamp inconsistency #2081

Closed
marian-pritsak opened this issue Sep 25, 2018 · 5 comments
Closed

Image build timestamp inconsistency #2081

marian-pritsak opened this issue Sep 25, 2018 · 5 comments

Comments

@marian-pritsak
Copy link
Collaborator

marian-pritsak commented Sep 25, 2018

Description

Image timestamp in show version is different from /host directory:

show version
SONiC Software Version: SONiC.201807.0-dirty-20180925.144022
Distribution: Debian 9.5
Kernel: 4.9.0-7-amd64
Build commit: cfe01f1
Build date: Tue Sep 25 14:40:22 UTC 2018
Built by: marianp@arc-build-server

Docker images:
REPOSITORY TAG IMAGE ID SIZE
docker-fpm-quagga 201807.0-dirty-20180925.144152 536a8c5d1e00 265.5 MB
docker-fpm-quagga latest 536a8c5d1e00 265.5 MB
docker-orchagent-mlnx 201807.0-dirty-20180925.144335 55a7fd731d51 260.7 MB
docker-orchagent-mlnx latest 55a7fd731d51 260.7 MB
docker-teamd 201807.0-dirty-20180925.144239 e47f7d2f9db9 258.7 MB
docker-teamd latest e47f7d2f9db9 258.7 MB
docker-snmp-sv2 201807.0-dirty-20180925.144228 3cbfa46c414d 291.2 MB
docker-snmp-sv2 latest 3cbfa46c414d 291.2 MB
docker-lldp-sv2 201807.0-dirty-20180925.144309 dc512d17d5f9 272 MB
docker-lldp-sv2 latest dc512d17d5f9 272 MB
docker-platform-monitor 201807.0-dirty-20180925.144204 890797d9aa87 283.4 MB
docker-platform-monitor latest 890797d9aa87 283.4 MB
docker-syncd-mlnx 201807.0-dirty-20180925.144327 8e4b54f86670 360.7 MB
docker-syncd-mlnx latest 8e4b54f86670 360.7 MB
docker-database 201807.0-dirty-20180925.144250 d3681404e4b4 252.4 MB
docker-database latest d3681404e4b4 252.4 MB
docker-dhcp-relay 201807.0-dirty-20180925.144300 0660bb644274 253.7 MB
docker-dhcp-relay latest 0660bb644274 253.7 MB
docker-router-advertiser 201807.0-dirty-20180925.144215 3d4efc9d477a 250 MB
docker-router-advertiser latest 3d4efc9d477a 250 MB

ls /host/
disk-img grub image-201807.0-dirty-20180925.144644 lost+found machine.conf

Steps to reproduce the issue:

Describe the results you received:
Image under /host has different timestamp in a name from image version, and rc.local cannot find firsttime file, resulting in initialization sequence failure

Describe the results you expected:
Image directory under /host should have the same timestamp in a name as image version

Additional information you deem important (e.g. issue happens only occasionally):

**Output of `show version`:**
SONiC Software Version: SONiC.201807.0-dirty-20180925.**144022**
Distribution: Debian 9.5
Kernel: 4.9.0-7-amd64
Build commit: cfe01f1
Build date: Tue Sep 25 14:40:22 UTC 2018
Built by: marianp@arc-build-server

Docker images:
REPOSITORY                 TAG                              IMAGE ID            SIZE
docker-fpm-quagga          201807.0-dirty-20180925.144152   536a8c5d1e00        265.5 MB
docker-fpm-quagga          latest                           536a8c5d1e00        265.5 MB
docker-orchagent-mlnx      201807.0-dirty-20180925.144335   55a7fd731d51        260.7 MB
docker-orchagent-mlnx      latest                           55a7fd731d51        260.7 MB
docker-teamd               201807.0-dirty-20180925.144239   e47f7d2f9db9        258.7 MB
docker-teamd               latest                           e47f7d2f9db9        258.7 MB
docker-snmp-sv2            201807.0-dirty-20180925.144228   3cbfa46c414d        291.2 MB
docker-snmp-sv2            latest                           3cbfa46c414d        291.2 MB
docker-lldp-sv2            201807.0-dirty-20180925.144309   dc512d17d5f9        272 MB
docker-lldp-sv2            latest                           dc512d17d5f9        272 MB
docker-platform-monitor    201807.0-dirty-20180925.144204   890797d9aa87        283.4 MB
docker-platform-monitor    latest                           890797d9aa87        283.4 MB
docker-syncd-mlnx          201807.0-dirty-20180925.144327   8e4b54f86670        360.7 MB
docker-syncd-mlnx          latest                           8e4b54f86670        360.7 MB
docker-database            201807.0-dirty-20180925.144250   d3681404e4b4        252.4 MB
docker-database            latest                           d3681404e4b4        252.4 MB
docker-dhcp-relay          201807.0-dirty-20180925.144300   0660bb644274        253.7 MB
docker-dhcp-relay          latest                           0660bb644274        253.7 MB
docker-router-advertiser   201807.0-dirty-20180925.144215   3d4efc9d477a        250 MB
docker-router-advertiser   latest                           3d4efc9d477a        250 MB
@marian-pritsak
Copy link
Collaborator Author

Suggest to cache date in a temporary file upon first call of https://github.com/Azure/sonic-buildimage/blob/0e85986088a97135dc4472d49c1f2fa8bc264318/functions.sh#L53 so that function will always return same value

@fillmorechen0928
Copy link

fillmorechen0928 commented Oct 1, 2018

This issue cause the firsttime file could not be found.

@lguohan
Copy link
Collaborator

lguohan commented Oct 1, 2018

@jipanyang , looks like introduce in this PR. https://github.com/Azure/sonic-buildimage/pull/2058/files

Can you fix?

@jipanyang
Copy link
Collaborator

Working on the fix.

@lguohan
Copy link
Collaborator

lguohan commented Oct 5, 2018

addressed in #2108

@lguohan lguohan closed this as completed Oct 5, 2018
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

No branches or pull requests

4 participants