ronivay / XenOrchestraInstallerUpdater

Xen Orchestra install/update script
GNU General Public License v3.0
1.24k stars 193 forks source link

error Command failed with exit code 1 #251

Closed dsiminiuk closed 3 months ago

dsiminiuk commented 3 months ago

OS Version: "Debian GNU/Linux" VERSION_ID="11" uname -r 5.10.0-31-amd64

Node.js version: v20.16.0 Yarn version: 1.22.22

Server specs Using the prebuilt Appliance 2 CPU 4 GB RAM df -h /dev/xvda1 Filesystem Size Used Avail Use% Mounted on /dev/xvda1 20G 7.0G 12G 38% /

Issue Build fails at

yarn run v1.22.22

Installation logfile

+ command -v git
/usr/bin/git
+ cd . && git config --get remote.origin.url
https://github.com/ronivay/XenOrchestraInstallerUpdater.git
+ cd . && git status --porcelain
+ cd . && git fetch
From https://github.com/ronivay/XenOrchestraInstallerUpdater
   87d03c8..4f066cc  master     -> origin/master
 * [new branch]      fix/non-root-config-permissions -> origin/fix/non-root-config-permissions
+ cd . && git rev-parse --short HEAD
87d03c8
+ cd . && git rev-parse --short FETCH_HEAD
4f066cc
+ cd . && git diff --name-only @{upstream}| grep xo-install.sh
xo-install.sh
+ cd . && git pull --ff-only
Updating 87d03c8..4f066cc
Fast-forward
 xo-install.sh | 5 +++++
 1 file changed, 5 insertions(+)
+ command -v git
/usr/bin/git
+ cd /opt/XenOrchestraInstallerUpdater && git config --get remote.origin.url
https://github.com/ronivay/XenOrchestraInstallerUpdater.git
+ cd /opt/XenOrchestraInstallerUpdater && git status --porcelain
+ cd /opt/XenOrchestraInstallerUpdater && git fetch
+ cd /opt/XenOrchestraInstallerUpdater && git rev-parse --short HEAD
4f066cc
+ cd /opt/XenOrchestraInstallerUpdater && git rev-parse --short FETCH_HEAD
4f066cc
+ cd /opt/XenOrchestraInstallerUpdater && git diff --name-only @{upstream}| grep xo-install.sh
Running script version 4f066cc with config:

PORT="80"
INSTALLDIR="/opt/xo"
CONFIGUPDATE=true
REPOSITORY="https://github.com/vatesfr/xen-orchestra"
BRANCH="master"
PLUGINS="xo-server-audit,xo-server-backup-reports,xo-server-load-balancer,xo-server-perf-alert,xo-server-transport-email,xo-server-usage-report,xo-sdn-controller"
AUTOUPDATE="true"
OS_CHECK="true"
ARCH_CHECK="true"
PRESERVE="2"
YARN_CACHE_CLEANUP="true"

+ id -u
0
+ uname -m
x86_64
+ command -v xe
+ grep ^VERSION_ID /etc/os-release | cut -d'=' -f2 | grep -Eo '[0-9]{1,2}' | head -1
11
+ grep ^NAME /etc/os-release | cut -d'=' -f2 | sed 's/"//g' | awk '{print $1}'
Debian
+ grep ^GRUB_DISTRIBUTOR /etc/default/grub | grep 'Xen Orchestra'
+ command -v dnf
+ command -v apt-get
/usr/bin/apt-get
+ command -v systemctl
/usr/bin/systemctl
+ df -P -k '/opt' | tail -1 | awk '{print $4}'
14052096
+ grep MemTotal /proc/meminfo | awk '{print $2}'
3987468
+ node -v 2>/dev/null| grep -Eo '[0-9.]+' | cut -d'.' -f1
20
+ apt-get update
Get:1 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Hit:2 https://dl.yarnpkg.com/debian stable InRelease
Hit:3 https://deb.nodesource.com/node_20.x nodistro InRelease
Hit:4 http://deb.debian.org/debian bullseye InRelease
Get:5 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:6 http://security.debian.org/debian-security bullseye-security/main Sources [184 kB]
Get:7 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [279 kB]
Get:8 http://security.debian.org/debian-security bullseye-security/main Translation-en [180 kB]
Fetched 734 kB in 1s (598 kB/s)
Reading package lists...
+ apt-get install -y --only-upgrade nodejs yarn
Reading package lists...
Building dependency tree...
Reading state information...
nodejs is already the newest version (20.16.0-1nodesource1).
yarn is already the newest version (1.22.22-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ cd "/opt/xo/xo-src/xen-orchestra" && git remote set-url origin "https://github.com/vatesfr/xen-orchestra" &&             git fetch --prune &&             git reset --hard origin/master &&             git clean -xdff
From https://github.com/vatesfr/xen-orchestra
 - [deleted]             (none)     -> origin/pierre-fix-self-cpu-usage-unit
 - [deleted]             (none)     -> origin/rest-api-dashboard-br
 - [deleted]             (none)     -> origin/rest-api-dashboard-eol
 - [deleted]             (none)     -> origin/stacked-bar-with-legends
   cb6cfc3a7..700149dab  master                 -> origin/master
   87f9326d6..78b1cda75  backupNg-selector      -> origin/backupNg-selector
 * [new branch]          compact-backup-reports -> origin/compact-backup-reports
   1d4fd37b5..4292411d5  perfAlert/noGuestToolsWarning -> origin/perfAlert/noGuestToolsWarning
 * [new branch]          pnpm                   -> origin/pnpm
 * [new branch]          proxy-api-unref        -> origin/proxy-api-unref
 + 7cf8c4683...03b28057a proxy-upgrade          -> origin/proxy-upgrade  (forced update)
 * [new branch]          removeSnapshotBeforeMigratingVdi -> origin/removeSnapshotBeforeMigratingVdi
 * [new branch]          rest-api-dashboard-backups-resume -> origin/rest-api-dashboard-backups-resume
   582a22f21..5de9e4d56  storage/duplicateCbtState -> origin/storage/duplicateCbtState
 * [new branch]          vmware-import/selectOnlyPoolSr -> origin/vmware-import/selectOnlyPoolSr
 * [new branch]          web-core/use-route-query-composable -> origin/web-core/use-route-query-composable
HEAD is now at 700149dab chore(xo-core): update NoVnc typescript type (#7900)
+ rm -rf "/opt/xo/xo-builds/xen-orchestra-202408101645"
+ cp -r "/opt/xo/xo-src/xen-orchestra" "/opt/xo/xo-builds/xen-orchestra-202408101645"
+ cd /opt/xo/xo-builds/xen-orchestra-202408101645 && git rev-parse HEAD
700149dabe2b1fa9a6f8518f77ce911c0763308a
+ cd /opt/xo/xo-builds/xen-orchestra-202408101645 && git rev-parse --short HEAD
700149dab
+ cd /opt/XenOrchestraInstallerUpdater
+ readlink -e /opt/xo/xo-server
/opt/xo/xo-builds/xen-orchestra-202408050500/packages/xo-server
+ cd /opt/xo/xo-server && git rev-parse HEAD
cb6cfc3a748dd169cdce9c3150b460c36b3d9611
+ cd /opt/xo/xo-server && git rev-parse --short HEAD
cb6cfc3a7
+ cd /opt/XenOrchestraInstallerUpdater
Updating Xen Orchestra from 'cb6cfc3a7' to '700149dab'
+ cd /opt/xo/xo-builds/xen-orchestra-202408101645 && yarn --network-timeout 300000 && yarn --network-timeout 300000 build
yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
warning url-loader@1.1.2: Invalid bin field for "url-loader".
[4/5] Linking dependencies...
warning "@commitlint/cli > @commitlint/load > cosmiconfig-typescript-loader@5.0.0" has unmet peer dependency "@types/node@*".
warning "@commitlint/cli > @commitlint/load > cosmiconfig-typescript-loader@5.0.0" has unmet peer dependency "typescript@>=4".
warning "@typescript-eslint/eslint-plugin > ts-api-utils@1.3.0" has unmet peer dependency "typescript@>=4.2.0".
warning " > @xen-orchestra/web-core@0.0.5" has unmet peer dependency "pinia@^2.1.7".
warning " > @xen-orchestra/web-core@0.0.5" has incorrect peer dependency "vue@^3.4.13".
warning " > @xen-orchestra/web-core@0.0.5" has unmet peer dependency "vue-i18n@^9.9.0".
warning " > @xen-orchestra/web-core@0.0.5" has unmet peer dependency "vue-router@^4.4.0".
warning "workspace-aggregator-7dd99046-89a0-4840-aacb-f0a996c7b28c > @vates/event-listeners-manager > tap > @tapjs/test > @isaacs/ts-node-temp-fork-for-pr-2009@10.9.7" has unmet peer dependency "@types/node@*".
warning "workspace-aggregator-7dd99046-89a0-4840-aacb-f0a996c7b28c > @vates/event-listeners-manager > tap > @tapjs/asserts > tcompare > react-element-to-jsx-string@15.0.0" has unmet peer dependency "react@^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 || ^18.0.0".
warning "workspace-aggregator-7dd99046-89a0-4840-aacb-f0a996c7b28c > @vates/event-listeners-manager > tap > @tapjs/asserts > tcompare > react-element-to-jsx-string@15.0.0" has unmet peer dependency "react-dom@^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 || ^18.0.0".
warning Workspaces can only be enabled in private projects.
[5/5] Building fresh packages...
$ husky install
husky - Git hooks installed
Done in 169.52s.
yarn run v1.22.22
$ TURBO_TELEMETRY_DISABLED=1 turbo run build --filter xo-server --filter xo-server-'*' --filter xo-web
• Packages in scope: xo-server, xo-server-audit, xo-server-auth-github, xo-server-auth-google, xo-server-auth-ldap, xo-server-auth-oidc, xo-server-auth-saml, xo-server-backup-reports, xo-server-load-balancer, xo-server-netbox, xo-server-perf-alert, xo-server-sdn-controller, xo-server-test, xo-server-test-plugin, xo-server-transport-email, xo-server-transport-icinga2, xo-server-transport-nagios, xo-server-transport-slack, xo-server-transport-xmpp, xo-server-usage-report, xo-server-web-hooks, xo-web
• Running build in 22 packages
• Remote caching disabled
  x internal errors encountered: external process killed a task

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ronivay commented 3 months ago

Hey,

Similar error was reported in https://github.com/ronivay/XenOrchestraInstallerUpdater/issues/248

Feels like either some intermittent issue or server might be running out of resources during build and process getting killed by eq. oom killer. Happens during XO build without much details, other than process was interrupted by something else so not much for me to debug from the script side. I'd check OS logs for any hints on this and try to increase RAM if this keeps happening.

dsiminiuk commented 3 months ago

The appliance has been running flawlessly for some time now. Looking at swap, 0, seems like it's not a RAM utilization problem. Rebooted. Ran Update again and it finished. No indications of what happened.