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

out of order execution of bash script in build_debian.sh #1924

Closed
lguohan opened this issue Aug 13, 2018 · 0 comments
Closed

out of order execution of bash script in build_debian.sh #1924

lguohan opened this issue Aug 13, 2018 · 0 comments
Assignees
Labels

Comments

@lguohan
Copy link
Collaborator

lguohan commented Aug 13, 2018

Description
It looks like there are out of execution in build_debian.sh

This issue is suspected to be related to this commit id. a799669

Failed cases:
https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all-pr/3099/console

In this case, the user add is executed before installing docker-engine

Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u4) ...
+ docker_deb_url=https://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.11.1-0~stretch_amd64.deb
++ mktemp
+ docker_deb_temp=/tmp/tmp.hKEP30LM1Z
+ trap_push 'rm -f /tmp/tmp.hKEP30LM1Z'
+ local 'oldcmd=sudo umount $FILESYSTEM_ROOT/proc || true; true'
+ local 'newcmd=rm -f /tmp/tmp.hKEP30LM1Z; sudo umount $FILESYSTEM_ROOT/proc || true; true'
+ trap -- 'rm -f /tmp/tmp.hKEP30LM1Z; sudo umount $FILESYSTEM_ROOT/proc || true; true' EXIT INT TERM HUP
+ _trap_push 'rm -f /tmp/tmp.hKEP30LM1Z; sudo umount $FILESYSTEM_ROOT/proc || true; true'
+ local 'next=rm -f /tmp/tmp.hKEP30LM1Z; sudo umount $FILESYSTEM_ROOT/proc || true; true'
++ echo 'rm -f /tmp/tmp.hKEP30LM1Z; sudo umount $FILESYSTEM_ROOT/proc || true; true'
++ sed -e 's/'\''/'\''\\'\'''\''/g'
+ eval 'trap_push() {
        local oldcmd='\''rm -f /tmp/tmp.hKEP30LM1Z; sudo umount $FILESYSTEM_ROOT/proc || true; true'\''
        local newcmd="$1; $oldcmd"
        trap -- "$newcmd" EXIT INT TERM HUP
        _trap_push "$newcmd"
    }'
+ wget https://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.11.1-0~stretch_amd64.deb -qO /tmp/tmp.hKEP30LM1Z
+ sudo mkdir -p ./fsroot/etc/systemd/system/docker.service.d/
+ sudo cp files/docker/docker.service.conf ./fsroot/etc/systemd/system/docker.service.d/
+ sudo LANG=C chroot ./fsroot useradd -G sudo,docker admin -c 'Default admin user,,,' -m -s /bin/bash
useradd: group 'docker' does not exist

Here is the correct case. the useradd is after the docker-engine installation.
https://sonic-jenkins.westus2.cloudapp.azure.com/job/mellanox/job/buildimage-mlnx-all/701/artifact/target/sonic-mellanox.bin.log

+ docker_deb_url=https://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.11.1-0~stretch_amd64.deb
++ mktemp
+ docker_deb_temp=/tmp/tmp.BVnnqiOOzm
+ trap_push 'rm -f /tmp/tmp.BVnnqiOOzm'
+ local 'oldcmd=sudo umount $FILESYSTEM_ROOT/proc || true; true'
+ local 'newcmd=rm -f /tmp/tmp.BVnnqiOOzm; sudo umount $FILESYSTEM_ROOT/proc || true; true'
+ trap -- 'rm -f /tmp/tmp.BVnnqiOOzm; sudo umount $FILESYSTEM_ROOT/proc || true; true' EXIT INT TERM HUP
+ _trap_push 'rm -f /tmp/tmp.BVnnqiOOzm; sudo umount $FILESYSTEM_ROOT/proc || true; true'
+ local 'next=rm -f /tmp/tmp.BVnnqiOOzm; sudo umount $FILESYSTEM_ROOT/proc || true; true'
++ echo 'rm -f /tmp/tmp.BVnnqiOOzm; sudo umount $FILESYSTEM_ROOT/proc || true; true'
++ sed -e 's/'\''/'\''\\'\'''\''/g'
+ eval 'trap_push() {
        local oldcmd='\''rm -f /tmp/tmp.BVnnqiOOzm; sudo umount $FILESYSTEM_ROOT/proc || true; true'\''
        local newcmd="$1; $oldcmd"
        trap -- "$newcmd" EXIT INT TERM HUP
        _trap_push "$newcmd"
    }'
+ wget https://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.11.1-0~stretch_amd64.deb -qO /tmp/tmp.BVnnqiOOzm
+ sudo dpkg --root=./fsroot -i /tmp/tmp.BVnnqiOOzm
Selecting previously unselected package docker-engine.
(Reading database ... 12981 files and directories currently installed.)
Preparing to unpack /tmp/tmp.BVnnqiOOzm ...
Unpacking docker-engine (1.11.1-0~stretch) ...
dpkg: dependency problems prevent configuration of docker-engine:
 docker-engine depends on iptables; however:
  Package iptables is not installed.
 docker-engine depends on libltdl7 (>= 2.4.6); however:
  Package libltdl7 is not installed.

dpkg: error processing package docker-engine (--install):
 dependency problems - leaving unconfigured
Processing triggers for systemd (232-25+deb9u4) ...
Errors were encountered while processing:
 docker-engine
+ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot ./fsroot apt-get -y install -f
Reading package lists...
Building dependency tree...
Reading state information...
Correcting dependencies... Done
The following additional packages will be installed:
  iptables libip6tc0 libiptc0 libltdl7 libmnl0 libnetfilter-conntrack3
  libnfnetlink0 libxtables12
The following NEW packages will be installed:
  iptables libip6tc0 libiptc0 libltdl7 libmnl0 libnetfilter-conntrack3
  libnfnetlink0 libxtables12
0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
Need to get 943 kB of archives.
After this operation, 2584 kB of additional disk space will be used.
Get:1 http://debian-archive.trafficmanager.net/debian stretch/main amd64 libip6tc0 amd64 1.6.0+snapshot20161117-6 [68.1 kB]
Get:2 http://debian-archive.trafficmanager.net/debian stretch/main amd64 libiptc0 amd64 1.6.0+snapshot20161117-6 [57.5 kB]
Get:3 http://debian-archive.trafficmanager.net/debian stretch/main amd64 libxtables12 amd64 1.6.0+snapshot20161117-6 [75.9 kB]
Get:4 http://debian-archive.trafficmanager.net/debian stretch/main amd64 libmnl0 amd64 1.0.4-2 [12.2 kB]
Get:5 http://debian-archive.trafficmanager.net/debian stretch/main amd64 libnfnetlink0 amd64 1.0.1-3 [13.5 kB]
Get:6 http://debian-archive.trafficmanager.net/debian stretch/main amd64 libnetfilter-conntrack3 amd64 1.0.6-2 [38.7 kB]
Get:7 http://debian-archive.trafficmanager.net/debian stretch/main amd64 iptables amd64 1.6.0+snapshot20161117-6 [288 kB]
Get:8 http://debian-archive.trafficmanager.net/debian stretch/main amd64 libltdl7 amd64 2.4.6-2 [389 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 943 kB in 0s (5956 kB/s)
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device)
Selecting previously unselected package libip6tc0:amd64.
(Reading database ... 13085 files and directories currently installed.)
Preparing to unpack .../0-libip6tc0_1.6.0+snapshot20161117-6_amd64.deb ...
Unpacking libip6tc0:amd64 (1.6.0+snapshot20161117-6) ...
Selecting previously unselected package libiptc0:amd64.
Preparing to unpack .../1-libiptc0_1.6.0+snapshot20161117-6_amd64.deb ...
Unpacking libiptc0:amd64 (1.6.0+snapshot20161117-6) ...
Selecting previously unselected package libxtables12:amd64.
Preparing to unpack .../2-libxtables12_1.6.0+snapshot20161117-6_amd64.deb ...
Unpacking libxtables12:amd64 (1.6.0+snapshot20161117-6) ...
Selecting previously unselected package libmnl0:amd64.
Preparing to unpack .../3-libmnl0_1.0.4-2_amd64.deb ...
Unpacking libmnl0:amd64 (1.0.4-2) ...
Selecting previously unselected package libnfnetlink0:amd64.
Preparing to unpack .../4-libnfnetlink0_1.0.1-3_amd64.deb ...
Unpacking libnfnetlink0:amd64 (1.0.1-3) ...
Selecting previously unselected package libnetfilter-conntrack3:amd64.
Preparing to unpack .../5-libnetfilter-conntrack3_1.0.6-2_amd64.deb ...
Unpacking libnetfilter-conntrack3:amd64 (1.0.6-2) ...
Selecting previously unselected package iptables.
Preparing to unpack .../6-iptables_1.6.0+snapshot20161117-6_amd64.deb ...
Unpacking iptables (1.6.0+snapshot20161117-6) ...
Selecting previously unselected package libltdl7:amd64.
Preparing to unpack .../7-libltdl7_2.4.6-2_amd64.deb ...
Unpacking libltdl7:amd64 (2.4.6-2) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up libxtables12:amd64 (1.6.0+snapshot20161117-6) ...
Setting up libltdl7:amd64 (2.4.6-2) ...
Setting up libnfnetlink0:amd64 (1.0.1-3) ...
Setting up libmnl0:amd64 (1.0.4-2) ...
Setting up libip6tc0:amd64 (1.6.0+snapshot20161117-6) ...
Setting up libnetfilter-conntrack3:amd64 (1.0.6-2) ...
Setting up libiptc0:amd64 (1.6.0+snapshot20161117-6) ...
Setting up iptables (1.6.0+snapshot20161117-6) ...
Setting up docker-engine (1.11.1-0~stretch) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service -> /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket -> /lib/systemd/system/docker.socket.
Running in chroot, ignoring request.
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u4) ...
+ sudo mkdir -p ./fsroot/etc/systemd/system/docker.service.d/
+ sudo cp files/docker/docker.service.conf ./fsroot/etc/systemd/system/docker.service.d/
+ sudo LANG=C chroot ./fsroot useradd -G sudo,docker admin -c 'Default admin user,,,' -m -s /bin/bash

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

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

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
vivekrnv added a commit to vivekrnv/sonic-buildimage that referenced this issue Nov 16, 2021
…t#1796)

efa2ff6 [show][platform summary] Add chassis type in the platform summary output(sonic-net#1922)
a39350c [aclshow] enhance ACL counters to work with FC infrastructure (sonic-net#1858)
ed88013 [sonic-package-manager] fix registry requests failing when no service field in Bearer fields (sonic-net#1921)
00b6045 [VS test] Increase test timeout (sonic-net#1924)

Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
qiluo-msft pushed a commit that referenced this issue Nov 22, 2021
a3e34e3 [Auto Techsupport] Event driven Techsupport Changes (#1796)
efa2ff6 [show][platform summary] Add chassis type in the platform summary output(#1922)
a39350c [aclshow] enhance ACL counters to work with FC infrastructure (#1858)
ed88013 [sonic-package-manager] fix registry requests failing when no service field in Bearer fields (#1921)
00b6045 [VS test] Increase test timeout (#1924)
taras-keryk pushed a commit to taras-keryk/sonic-buildimage that referenced this issue Apr 28, 2022
*Increase test timeout to 240mts from 180mts
Signed-off-by: Sudharsan Dhamal Gopalarathnam <sudharsand@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants