Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Bug: performance problem in build-bud step of nodejs and nodejs loopback pipeline #121

Closed
tam512 opened this issue Nov 6, 2019 · 69 comments
Assignees

Comments

@tam512
Copy link

tam512 commented Nov 6, 2019

  • Use Kabanero v0.2.0
  • Tekton pipelines nodejs-build-deploy-pipeline and nodejs-loopback-build-deploy-pipeline run build-bud step take over 40 minutes to complete.
  • Example of Nodejs Loopback build-bud time:
name: build-bud
terminated:
  containerID: 'cri-o://35d10d642b23d546b147471ee4b2a0591c2a70d7d4c40f62c47e311bf4654049'
  exitCode: 0
  finishedAt: '2019-11-06T15:35:46Z'
  reason: Completed
  startedAt: '2019-11-06T14:48:25Z'
@tam512 tam512 added bug Something isn't working pipelines labels Nov 6, 2019
@tam512
Copy link
Author

tam512 commented Nov 6, 2019

Attach the Nodejs Loopback build-bud log
loopback-buildbud-try2.log.zip

@marikaj123
Copy link
Member

@tseelbach - Please help with assessing this issue and assign it to the appropriate owner.

@tam512
Copy link
Author

tam512 commented Nov 15, 2019

For nodejs-loopback-build-push-deploy-pipeline, the build step can not be completed, and the build run will fail with error PipelineRun "xxxxx-loopback-webhook-1573776386-2h6ds" failed to finish within "&Duration{Duration:1h0m0s,}"

@kvijai82
Copy link
Contributor

Looks like there is a fix in the latest buildah to improve performance of the copy step. Will pull that in and see if there is any improvement in this release.

@groeges
Copy link

groeges commented Nov 28, 2019

There is a fix in the latest buildah that reduces the time taken to perform a COPY step within the docker file, however the appsody/appsody-buildah docker image that the pipelines uses is unable to utilise this later version as other fixes that are required (to prevent mount issues) have not been implemented. This means that we have to continue using buildah v1.9.0 until the fixes for the mount issue has been implemented in the later code and then a newer version of the appsody/appsody-buildah image will be generated for use by the pipelines.

@marikaj123
Copy link
Member

It is under debugging

@marikaj123
Copy link
Member

marikaj123 commented Dec 16, 2019

Gireesh and Kyle Christianson would need to help with this this issue.

@kvijai82
Copy link
Contributor

The node pipelines were failing with the latest buildah. Looks like there are some new fuse prereqs for it to work. @aadeshpa could you please look into this when you are back. Maybe first try to see if we get a performance improvement with the java ones and the new buildah. Thanks!

@kvijai82 kvijai82 assigned aadeshpa and unassigned kvijai82 Dec 16, 2019
@kvijai82 kvijai82 removed this from the Iteration 19.24 | Nov 18 - Nov 29 milestone Dec 16, 2019
@gireeshpunathil
Copy link

  • is there any profile data available for me to inspect?
  • what is the baseline we are using to compare? when I was running against an OCP cluster it was a couple of minutes. what changed recently?
  • is there evidence that file copy is where the time is spent?

Per last discussion with Kyles, these were observed:

  • The buildah upgrade breaks appsody extract and bunch of other things
  • fix for that landed in fuse-overlay, not in buildah
  • fuse-overlay is an os component, not bundled in buildah
  • so a comprehensive solution is to upgrade buildah in the appsody-buildah image and fuse-overlay into the OS. The first one is easy to do, the second is not - as it involves changing every system that we provision / use.

I would suggest we:

  • define a baseline where the perf is good (in terms of few minutes)
  • figure out the step that takes long time (40 minutes) and the change that caused regression and take it from thereon

can you share the pipeline log that has timestamps, to start with?

@aadeshpa
Copy link
Contributor

aadeshpa commented Dec 23, 2019

I tried testing pipelineruns(build-push-pipeline) using old appsody buildah image appsody/appsody-buildah:0.5.0-buildah1.9.0 and then with new image appsody/appsody-buildah:0.5.3 and found below results.

  1. One good thing is with the new image appsody-buildah:0.5.3 we are able to run nodejs related pipelines where earlier we use to get error in Yum upgrade step.
  2. However I did not see any performance improvement between the old image and new image. Below are the results.
Pipeline(build-push-pipeline) Buildah image Time
Java-mp appsody/appsody-buildah:0.5.3 6 min 20
Java-mp appsody/appsody-buildah:0.5.0-buildah1.9.0 6 min 22
     
     
nodejs-express appsody/appsody-buildah:0.5.3 16 min
nodejs-express appsody/appsody-buildah:0.5.0-buildah1.9.0 15 to 17 min
     
     
nodejs appsody/appsody-buildah:0.5.3 12 min
nodejs appsody/appsody-buildah:0.5.0-buildah1.9.0 12 min 

cc: @gpunathi@in.ibm.com , @kvijai82

@gireeshpunathil
Copy link

thanks @aadeshpa . It would be interesting to see what are the values for loopback, for which this issue was raised originally.

@aadeshpa
Copy link
Contributor

aadeshpa commented Dec 24, 2019

I tested with nodejs-loopback and below is the step in the logs where it stays stuck and then after 60 min, the pod itself terminates and the pipelinerun fails.

[Buildah] Installed:
[Buildah]   diffutils-3.6-5.el8.x86_64               libxkbcommon-0.8.2-1.el8.x86_64      
[Buildah]   xkeyboard-config-2.24-3.el8.noarch      
[Buildah] 
[Buildah] Complete!
[Buildah] 0 files removed
[Buildah] Finished installing dependencies
[Buildah] STEP 14: RUN groupadd --gid 1000 node   && useradd --uid 1000 --gid node --shell /bin/bash --create-home node
[Buildah] STEP 15: RUN mkdir ~/.npm-global
[Buildah] STEP 16: ENV NPM_CONFIG_PREFIX=~/.npm-global
[Buildah] STEP 17: COPY --chown=node:node . /project

then at step

[Buildah] STEP 18: COPY --chown=node:node --from=0 /project/node_modules /project/node_modules
nodejs-loopback appsody/appsody-buildah:0.5.3 timeout 60 min(pipelinerun failed)
nodejs-loopback appsody/appsody-buildah:0.5.0-buildah1.9.0  timeout 60 min (pipelinerun failed)

@gireeshpunathil
Copy link

thanks @aadeshpa . I am able to recreate this outside of the pipeline, and have raised a detailed bug report with buildah community.

the problem seems to raise from the fact that we have huge (~200 MB) node_modules folder belonging to the `loopback dependency to be copied to the image.

As we are building the dependency inside the Dockerfile , I am not sure why this folder should be there in the first place - looks like it is part of the original template? @raymondfeng

@schiwitz
Copy link

I ran into this issue while building a 1G container. I used buildah --debug bud . . to verify and saw the .local files where getting put in the container so the buildah process would. run until the filesystem filled. I put the .local in .dockerignore and was able to buildah bud the image.

@aadeshpa
Copy link
Contributor

I went passed ahead of the error to download the leapp-data3.tar.gz and then run preupgrade step that gave below errors in the report so we could not proceed with the upgrade from RHEL
7.6 to 8.

============================================================

A report has been generated at /var/log/leapp/leapp-report.json
A report has been generated at /var/log/leapp/leapp-report.txt
A report has been generated at /var/log/leapp/leapp-preupgrade.log

============================================================
                       END OF REPORT                        
============================================================
[root@yoked-inf files]# cat /var/log/leapp/leapp-report.txt
Risk Factor: high (inhibitor)
Title: Unsupported network configuration
Summary: Detected multiple network interfaces using unstable kernel names (e.g. eth0, eth1). Upgrade process can not continue because stability of names can not be guaranteed. Please read the article at https://access.redhat.com/solutions/4067471 for more information.
----------------------------------------
Risk Factor: high
Title: Packages will not be installed
Summary: 4 packages will not be installed or upgraded due to repositories unknown to leapp:
- postfix-pcre
- postfix-sqlite
- libselinux-python3
- postfix-cdb
----------------------------------------
Risk Factor: low
Title: Grep has incompatible changes in the next major version
Summary: If a file contains data improperly encoded for the current locale, and this is discovered before any of the file's contents are output, grep now treats the file as binary.
The 'grep -P' no longer reports an error and exits when given invalid UTF-8 data. Instead, it considers the data to be non-matching.
In locales with multibyte character encodings other than UTF-8, grep -P now reports an error and exits instead of misbehaving.
When searching binary data, grep now may treat non-text bytes as line terminators. This can boost performance significantly.
The 'grep -z' no longer automatically treats the byte '\200' as binary data.
Context no longer excludes selected lines omitted because of -m. For example, 'grep "^" -m1 -A1' now outputs the first two input lines, not just the first line.

Remediation: [hint] Please update your scripts to be compatible with the changes.
----------------------------------------
Risk Factor: low
Title: OpenSSH configured with removed configuration Protocol
Summary: OpenSSH is configured with removed configuration option Protocol. If this used to be for enabling SSHv1, this is no longer supported in RHEL 8. Otherwise this option can be simply removed.
----------------------------------------
Risk Factor: high
Title: Packages not signed by Red Hat found in the system
Summary: The following packages have not been signed by Red Hat and may be removed in the upgrade process:
- falcon-sensor
- katello-ca-consumer-ltc-rhs72.raleigh.ibm.com
Remediation: [command] yum -y remove falcon-sensor katello-ca-consumer-ltc-rhs72.raleigh.ibm.com
----------------------------------------
Risk Factor: low
Title: ntpd and ntpdate configuration will be migrated
Summary: ntpd, ntpdate service(s) detected to be enabled and active
----------------------------------------
Risk Factor: high
Title: Difference in Python versions and support in RHEL 8
Summary: In RHEL 8, there is no 'python' command. Python 3 (backward incompatible) is the primary Python version and Python 2 is available with limited support and limited set of packages. Read more here: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/configuring_basic_system_settings/#using-python3
Remediation: [hint] Please run "alternatives --set python /usr/bin/python3" after upgrade
----------------------------------------
Risk Factor: low
Title: Postfix has incompatible changes in the next major version
Summary: Postfix 3.x has so called "compatibility safety net" that runs Postfix programs with backwards-compatible default settings. It will log a warning whenever backwards-compatible default setting may be required for continuity of service. Based on this logging the system administrator can decide if any backwards-compatible settings need to be made permanent in main.cf or master.cf, before turning off the backwards-compatibility safety net.
The backward compatibility safety net is by default turned off in Red Hat Enterprise Linux 8.
It can be turned on by running:  "postconf -e compatibility_level=0
It can be turned off by running: "postconf -e compatibility_level=2

In the Postfix MySQL database client, the default "option_group" value has changed to "client", i.e. it now reads options from the [client] group from the MySQL configuration file. To disable it, set "option_group" to the empty string.

The postqueue command no longer forces all message arrival times to be reported in UTC. To get the old behavior, set TZ=UTC in main.cf:import_environment.

Postfix 3.2 enables elliptic curve negotiation. This changes the default smtpd_tls_eecdh_grade setting to "auto", and introduces a new parameter "tls_eecdh_auto_curves" with the names of curves that may be negotiated.

The "master.cf" chroot default value has changed from "y" (yes) to "n" (no). This applies to master.cf services where chroot field is not explicitly specified.

The "append_dot_mydomain" default value has changed from "yes" to "no". You may need changing it to "yes" if senders cannot use complete domain names in e-mail addresses.

The "relay_domains" default value has changed from "$mydestination" to the empty value. This could result in unexpected "Relay access denied" errors or ETRN errors, because now will postfix by default relay only for the localhost.

The "mynetworks_style" default value has changed from "subnet" to "host". This parameter is used to implement the "permit_mynetworks" feature. The change could result in unexpected "access denied" errors, because postfix will now by default trust only the local machine, not the remote SMTP clients on the same IP subnetwork.

----------------------------------------
Risk Factor: info
Title: SElinux disabled
Summary: SElinux disabled, continuing...
----------------------------------------
Risk Factor: low
Title: Some enabled RPM repositories are unknown to Leapp
Summary: The following repositories with Red Hat-signed packages are unknown to Leapp:
- Local-Extras
- Local-Base
And the following packages installed from those repositories may not be upgraded:
- keyutils
- openssh-clients
- nss-tools
- perl-libs
- dhcp-libs
- nss-pem
- efivar-libs
- libsmartcols
- rsyslog
- iwl105-firmware
- openssl-libs
- python-jinja2
- systemd
- selinux-policy
- libsolv
- gcc-gfortran
- perl-macros
- iwl135-firmware
- nspr
- libnfsidmap
- policycoreutils-python
- grub2
- iwl2000-firmware
- libverto-libevent
- gcc-c++
- policycoreutils
- python-IPy
- libquadmath
- freetype
- iwl6000g2a-firmware
- dbus-libs
- iwl7265-firmware
- dhclient
- python
- iwl6050-firmware
- systemd-libs
- iwl4965-firmware
- systemd-python
- iwl2030-firmware
- libgudev1
- gnutls
- util-linux
- NetworkManager-config-server
- python-markupsafe
- libquadmath-devel
- iproute
- libyaml
- dbus
- libpath_utils
- python-babel
- tuned
- krb5-libs
- net-tools
- teamd
- systemd-sysv
- kernel
- rpcbind
- scap-security-guide
- python2-libcomps
- libblkid
- grub2-common
- audit-libs
- aide
- nss-sysinit
- libgcc
- json-glib
- patch
- libmodulemd
- python-enum34
- rsync
- libref_array
- glibc
- device-mapper
- shadow-utils
- lvm2-libs
- libcgroup
- linux-firmware
- grub2-tools-extra
- python2-leapp
- ipset
- ntp
- iwl1000-firmware
- git
- leapp-repository-deps
- libbasicobjects
- wget
- kernel-tools
- glibc-common
- haproxy
- elfutils-libs
- subscription-manager-rhsm
- libjpeg-turbo
- libuuid
- openssl
- dhcp-common
- libgomp
- python2-libdnf
- iwl5000-firmware
- subscription-manager
- python-perf
- nss-softokn
- glib2
- mariadb-libs
- binutils
- bind-export-libs
- hesiod
- iwl100-firmware
- subscription-manager-rhsm-certificates
- tcp_wrappers
- dnf-data
- kernel-devel
- libstdc++
- libcollection
- sos
- python-libs
- grub2-tools
- iwl7260-firmware
- nss
- iwl5150-firmware
- vim-minimal
- libssh2
- dnf
- libgfortran
- libstdc++-devel
- ntpdate
- grub2-pc-modules
- perl
- tzdata
- NetworkManager-libnm
- microcode_ctl
- iwl3160-firmware
- NetworkManager
- bind-libs-lite
- procps-ng
- iwl6000-firmware
- setools-libs
- quota-nls
- openssh-server
- libdnf
- nfs-utils
- kexec-tools
- libevent
- libtirpc
- kernel-headers
- leapp-deps
- ipset-libs
- kernel-tools-libs
- device-mapper-event-libs
- ksh
- lvm2
- nss-util
- device-mapper-event
- autofs
- openssh
- selinux-policy-targeted
- cronie-anacron
- xfsprogs
- NetworkManager-team
- libcomps
- sudo
- grub2-pc
- unzip
- sysstat
- bind-license
- curl
- perl-Git
- compat-libtiff3
- libmount
- gcc
- leapp-repository
- libcurl
- audit-libs-python
- leapp-repository-sos-plugin
- librhsm
- iwl3945-firmware
- elfutils-libelf
- nss-softokn-freebl
- python2-dnf
- glibc-devel
- elfutils-default-yama-scope
- quota
- device-mapper-libs
- polkit
- perl-Pod-Escapes
- openldap
- augeas-libs
- lm_sensors-libs
- leapp
- librepo
- glibc-headers
- cronie
- checkpolicy
- libteam
- audit
- iwl6000g2b-firmware
- python2-hawkey
- NetworkManager-tui
- libsemanage-python
- gssproxy
- grub2-tools-minimal
- pciutils
- cpp
- autogen-libopts
- elfutils
- libini_config
Remediation: [hint] You can file a request to add this repository to the scope of in-place upgrades by filing a support ticket
----------------------------------------

@gireeshpunathil
Copy link

@aadeshpa - please see comments #121 (comment) and #121 (comment) . To resolve this issue quickly, we need to isolate platforms where it works and where it does not, out of the box or with tweaking, and based on count, the versions where it works etc. we may take a call about whether this approach (fuse bug fix and buildah bug fix) is acceptable or not.

Pipeline testing can be complex; and as you and @jdmcclur also have pointed out, there could be unrelated issues hiding somewhere else (OS upgrade issue / Dockerfile syntax issue etc). We want to isolate all of those and diagnose and resolve the performance + mount bug through this issue. For that, I recommend we follow #121 (comment)

@marikaj123
Copy link
Member

Looking for an env to test with. Requested a Fyre env to install Kabanero and try to use the Codeready containers on it. then try to install Kabanero to test.

@aadeshpa
Copy link
Contributor

aadeshpa commented Jan 29, 2020

@marikaj123
We are in process to validate the fix for this which is in appsody/appsody-buildahimage however the point to be noted is if this fix is to be used we will surely updated pipeline with that new fixed image of appsody/appsody-buildah but there will be a manadatory requirement for user to update their host VM from RHEL 7.6 to RHEL 8.0 as per explained by @gireeshpunathil in earlier comments.

Below are the environment setup options we tried and first 3 were unsuccessful. Since we need RHEL 8.0 to test this fix from @gireeshpunathil and fyre env only provides the OCP4.2 cluster with RHEL 7.6:

  1. We tried getting OCP4.2 cluster from fyre env, which gives RHEL 7.6 and to test this we need RHEL 8.0 so we tried upgrade path where we tried steps to upgrade inplace RHEL 7.6 to 8 and that was not successful.

  2. Second thing we tried was requesting single node ember of RHEL 8.0 from fyre environment and tried running the test container with the fix from @gireeshpunathil and just tried running appsody build command to build the nodejs-express project but we are facing issues with this test.

  3. Next thing we tried to do is to install kabanero in single node ember ofr RHEL 8.0 from fyre environment, but that install does not work on it.

  4. (In progress)Next option to get the environment to test this is requesting single node FYRE ember with RHEL 8.0 and try to install the Code ready container which gives us OCP 4.2 installed in that container and then we would try to install kabanero in that container.

@gireeshpunathil
Copy link

I will debug item (2) of the above.

@aadeshpa
Copy link
Contributor

4(continue from previous comment). we are working with @stevenschader , he is helping us setup an fyre env with RHEL 8.0 and code ready container which will give us OCP 4 in that container, and then we will try to install kabanero on top of it to test this fix.

@aadeshpa
Copy link
Contributor

we were able to get fyre env with code ready container installed on top of RHEL 8.1 and on that CRC container which had OCP 4 in the container. I was successfully able to run our kabanero install in this environment. Now i ran first pipeline nodjes-exp on it and it was successful. @steven Schader helped me get the fyre node setup with all that installed on it. cc: @smcclem @bsulliv
I will use this environment to test the fix from @gireesh

@aadeshpa
Copy link
Contributor

aadeshpa commented Jan 30, 2020

@gireeshpunathil : I tested with your test container gireeshpunathil/appsody-buildah:v1 by running the nodejs-express build-push pipeline in RHEL 8.1 and kabanero 0-5-0 collection and it still failed at Yum Upgrade step.

This means for nodejs-express pipeline we are getting same error result in RHEL 7.6 and RHEL 8.1 with Yum upgrade error with appsody buildah container having the fix.

Environment OS

[kevin@svtcrc-389745-1 manual-pipeline-runs]$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.1 (Ootpa)

Nodjes-express Pipelinerun log snipped with error

[Buildah] STEP 2: USER root
[Buildah] STEP 3: RUN yum upgrade --disableplugin=subscription-manager -y  && yum install --disableplugin=subscription-manager python2 -y  && yum clean --disableplugin=subscription-manager packages  && ln -s /usr/bin/python2 /usr/bin/python  && useradd --uid 1000 --gid 0 --shell /bin/bash --create-home node
[Buildah] Red Hat Universal Base Image 8 (RPMs) - BaseOS  1.2 MB/s | 760 kB     00:00    
[Buildah] Red Hat Universal Base Image 8 (RPMs) - AppStre 3.7 MB/s | 3.1 MB     00:00    
[Buildah] Red Hat Universal Base Image 8 (RPMs) - CodeRea  19 kB/s | 9.1 kB     00:00    
[Buildah] Dependencies resolved.
[Buildah] ================================================================================
[Buildah]  Package             Arch      Version                 Repository          Size
[Buildah] ================================================================================
[Buildah] Upgrading:
[Buildah]  systemd-libs        x86_64    239-18.el8_1.1          ubi-8-baseos       560 k
[Buildah]  setup               noarch    2.12.2-2.el8_1.1        ubi-8-baseos       180 k
[Buildah]  systemd             x86_64    239-18.el8_1.1          ubi-8-baseos       3.5 M
[Buildah]  libarchive          x86_64    3.3.2-8.el8_1           ubi-8-baseos       359 k
[Buildah]  ca-certificates     noarch    2019.2.32-80.0.el8_1    ubi-8-baseos       407 k
[Buildah]  sqlite              x86_64    3.26.0-4.el8_1          ubi-8-baseos       666 k
[Buildah]  sqlite-libs         x86_64    3.26.0-4.el8_1          ubi-8-baseos       579 k
[Buildah]  bsdtar              x86_64    3.3.2-8.el8_1           ubi-8-baseos        71 k
[Buildah]  sqlite-devel        x86_64    3.26.0-4.el8_1          ubi-8-baseos       163 k
[Buildah]  kernel-headers      x86_64    4.18.0-147.3.1.el8_1    ubi-8-baseos       2.7 M
[Buildah]  systemd-pam         x86_64    239-18.el8_1.1          ubi-8-baseos       230 k
[Buildah]  gdb-gdbserver       x86_64    8.2-6.el8_0             ubi-8-appstream    435 k
[Buildah]  wget                x86_64    1.19.5-8.el8_1.1        ubi-8-appstream    735 k
[Buildah]  git-core            x86_64    2.18.2-1.el8_1          ubi-8-appstream    5.0 M
[Buildah]  git-core-doc        noarch    2.18.2-1.el8_1          ubi-8-appstream    2.3 M
[Buildah]  perl-Git            noarch    2.18.2-1.el8_1          ubi-8-appstream     77 k
[Buildah]  git                 x86_64    2.18.2-1.el8_1          ubi-8-appstream    186 k
[Buildah] Installing dependencies:
[Buildah]  xkeyboard-config    noarch    2.24-3.el8              ubi-8-appstream    828 k
[Buildah] Installing weak dependencies:
[Buildah]  diffutils           x86_64    3.6-5.el8               ubi-8-baseos       359 k
[Buildah]  libxkbcommon        x86_64    0.8.2-1.el8             ubi-8-appstream    116 k
[Buildah] 
[Buildah] Transaction Summary
[Buildah] ================================================================================
[Buildah] Install   3 Packages
[Buildah] Upgrade  17 Packages
[Buildah] 
[Buildah] Total download size: 19 M
[Buildah] Downloading Packages:
[Buildah] (1/20): libxkbcommon-0.8.2-1.el8.x86_64.rpm     426 kB/s | 116 kB     00:00    
[Buildah] (2/20): diffutils-3.6-5.el8.x86_64.rpm          718 kB/s | 359 kB     00:00    
[Buildah] (3/20): setup-2.12.2-2.el8_1.1.noarch.rpm       1.0 MB/s | 180 kB     00:00    
[Buildah] (4/20): systemd-libs-239-18.el8_1.1.x86_64.rpm  1.3 MB/s | 560 kB     00:00    
[Buildah] (5/20): xkeyboard-config-2.24-3.el8.noarch.rpm  1.0 MB/s | 828 kB     00:00    
[Buildah] (6/20): libarchive-3.3.2-8.el8_1.x86_64.rpm     1.9 MB/s | 359 kB     00:00    
[Buildah] (7/20): ca-certificates-2019.2.32-80.0.el8_1.no 2.9 MB/s | 407 kB     00:00    
[Buildah] (8/20): sqlite-3.26.0-4.el8_1.x86_64.rpm        5.4 MB/s | 666 kB     00:00    
[Buildah] (9/20): sqlite-libs-3.26.0-4.el8_1.x86_64.rpm   4.9 MB/s | 579 kB     00:00    
[Buildah] (10/20): bsdtar-3.3.2-8.el8_1.x86_64.rpm        1.3 MB/s |  71 kB     00:00    
[Buildah] (11/20): sqlite-devel-3.26.0-4.el8_1.x86_64.rpm 2.7 MB/s | 163 kB     00:00    
[Buildah] (12/20): systemd-pam-239-18.el8_1.1.x86_64.rpm  2.9 MB/s | 230 kB     00:00    
[Buildah] (13/20): gdb-gdbserver-8.2-6.el8_0.x86_64.rpm   3.4 MB/s | 435 kB     00:00    
[Buildah] (14/20): kernel-headers-4.18.0-147.3.1.el8_1.x8 9.1 MB/s | 2.7 MB     00:00    
[Buildah] (15/20): wget-1.19.5-8.el8_1.1.x86_64.rpm       5.4 MB/s | 735 kB     00:00    
[Buildah] (16/20): systemd-239-18.el8_1.1.x86_64.rpm      3.4 MB/s | 3.5 MB     00:01    
[Buildah] (17/20): perl-Git-2.18.2-1.el8_1.noarch.rpm     1.3 MB/s |  77 kB     00:00    
[Buildah] (18/20): git-2.18.2-1.el8_1.x86_64.rpm          2.3 MB/s | 186 kB     00:00    
[Buildah] (19/20): git-core-doc-2.18.2-1.el8_1.noarch.rpm 3.7 MB/s | 2.3 MB     00:00    
[Buildah] (20/20): git-core-2.18.2-1.el8_1.x86_64.rpm     5.6 MB/s | 5.0 MB     00:00    
[Buildah] --------------------------------------------------------------------------------
[Buildah] Total                                           8.2 MB/s |  19 MB     00:02     
[Buildah] Running transaction check
[Buildah] Transaction check succeeded.
[Buildah] Running transaction test
[Buildah] Transaction test succeeded.
[Buildah] Running transaction
[Buildah]   Preparing        :                                                        1/1 
[Buildah]   Running scriptlet: git-core-2.18.2-1.el8_1.x86_64                         1/1 
[Buildah]   Upgrading        : git-core-2.18.2-1.el8_1.x86_64                        1/37 
[Buildah]   Upgrading        : sqlite-libs-3.26.0-4.el8_1.x86_64                     2/37 
[Buildah]   Upgrading        : sqlite-3.26.0-4.el8_1.x86_64                          3/37 
[Buildah]   Upgrading        : git-core-doc-2.18.2-1.el8_1.noarch                    4/37 
[Buildah]   Upgrading        : perl-Git-2.18.2-1.el8_1.noarch                        5/37 
[Buildah]   Upgrading        : git-2.18.2-1.el8_1.x86_64                             6/37 
[Buildah]   Upgrading        : libarchive-3.3.2-8.el8_1.x86_64                       7/37 
[Buildah]   Upgrading        : systemd-libs-239-18.el8_1.1.x86_64                    8/37 
[Buildah]   Running scriptlet: systemd-libs-239-18.el8_1.1.x86_64                    8/37 
[Buildah]   Installing       : xkeyboard-config-2.24-3.el8.noarch                    9/37 
[Buildah]   Installing       : libxkbcommon-0.8.2-1.el8.x86_64                      10/37 
[Buildah]   Installing       : diffutils-3.6-5.el8.x86_64                           11/37 
[Buildah]   Running scriptlet: diffutils-3.6-5.el8.x86_64                           11/37 
[Buildah]   Upgrading        : systemd-pam-239-18.el8_1.1.x86_64                    12/37 
[Buildah]   Running scriptlet: systemd-239-18.el8_1.1.x86_64                        13/37 
[Buildah]   Upgrading        : systemd-239-18.el8_1.1.x86_64                        13/37 
[Buildah]   Running scriptlet: systemd-239-18.el8_1.1.x86_64                        13/37 
[Buildah]   Upgrading        : bsdtar-3.3.2-8.el8_1.x86_64                          14/37 
[Buildah]   Upgrading        : sqlite-devel-3.26.0-4.el8_1.x86_64                   15/37 
[Buildah]   Upgrading        : wget-1.19.5-8.el8_1.1.x86_64                         16/37 
[Buildah]   Running scriptlet: wget-1.19.5-8.el8_1.1.x86_64                         16/37 
[Buildah]   Upgrading        : gdb-gdbserver-8.2-6.el8_0.x86_64                     17/37 
[Buildah]   Upgrading        : kernel-headers-4.18.0-147.3.1.el8_1.x86_64           18/37 
[Buildah]   Running scriptlet: ca-certificates-2019.2.32-80.0.el8_1.noarch          19/37 
[Buildah]   Upgrading        : ca-certificates-2019.2.32-80.0.el8_1.noarch          19/37 
[Buildah]   Running scriptlet: ca-certificates-2019.2.32-80.0.el8_1.noarch          19/37 
[Buildah]   Upgrading        : setup-2.12.2-2.el8_1.1.noarch                        20/37 
[Buildah] warning: /etc/shadow created as /etc/shadow.rpmnew
[Buildah] 
[Buildah]   Running scriptlet: setup-2.12.2-2.el8_1.1.noarch                        20/37 
[Buildah]   Cleanup          : sqlite-devel-3.26.0-3.el8.x86_64                     21/37 
[Buildah]   Cleanup          : perl-Git-2.18.1-4.el8.noarch                         22/37 
[Buildah]   Cleanup          : kernel-headers-4.18.0-147.el8.x86_64                 23/37 
[Buildah]   Cleanup          : ca-certificates-2018.2.24-6.el8.noarch               24/37 
[Buildah]   Cleanup          : setup-2.12.2-2.el8.noarch                            25/37 
[Buildah]   Cleanup          : git-2.18.1-4.el8.x86_64                              26/37 
[Buildah]   Cleanup          : bsdtar-3.3.2-7.el8.x86_64                            27/37 
[Buildah]   Running scriptlet: systemd-239-18.el8.x86_64                            28/37 
[Buildah]   Cleanup          : systemd-239-18.el8.x86_64                            28/37 
[Buildah]   Cleanup          : git-core-doc-2.18.1-4.el8.noarch                     29/37 
[Buildah]   Cleanup          : sqlite-3.26.0-3.el8.x86_64                           30/37 
[Buildah]   Cleanup          : sqlite-libs-3.26.0-3.el8.x86_64                      31/37 
[Buildah]   Cleanup          : git-core-2.18.1-4.el8.x86_64                         32/37 
[Buildah]   Cleanup          : systemd-libs-239-18.el8.x86_64                       33/37 
[Buildah]   Cleanup          : systemd-pam-239-18.el8.x86_64                        34/37 
[Buildah]   Cleanup          : libarchive-3.3.2-7.el8.x86_64                        35/37 
[Buildah]   Running scriptlet: wget-1.19.5-7.el8_0.1.x86_64                         36/37 
[Buildah]   Cleanup          : wget-1.19.5-7.el8_0.1.x86_64                         36/37 
[Buildah]   Cleanup          : gdb-gdbserver-8.2-6.el8.x86_64                       37/37 
[Buildah]   Running scriptlet: gdb-gdbserver-8.2-6.el8.x86_64                       37/37 
[Buildah]   Running scriptlet: systemd-239-18.el8_1.1.x86_64                        37/37 
[Buildah]   Verifying        : diffutils-3.6-5.el8.x86_64                            1/37 
[Buildah]   Verifying        : libxkbcommon-0.8.2-1.el8.x86_64                       2/37 
[Buildah]   Verifying        : xkeyboard-config-2.24-3.el8.noarch                    3/37 
[Buildah]   Verifying        : systemd-libs-239-18.el8_1.1.x86_64                    4/37 
[Buildah]   Verifying        : systemd-libs-239-18.el8.x86_64                        5/37 
[Buildah]   Verifying        : setup-2.12.2-2.el8_1.1.noarch                         6/37 
[Buildah]   Verifying        : setup-2.12.2-2.el8.noarch                             7/37 
[Buildah]   Verifying        : systemd-239-18.el8_1.1.x86_64                         8/37 
[Buildah]   Verifying        : systemd-239-18.el8.x86_64                             9/37 
[Buildah]   Verifying        : libarchive-3.3.2-8.el8_1.x86_64                      10/37 
[Buildah]   Verifying        : libarchive-3.3.2-7.el8.x86_64                        11/37 
[Buildah]   Verifying        : ca-certificates-2019.2.32-80.0.el8_1.noarch          12/37 
[Buildah]   Verifying        : ca-certificates-2018.2.24-6.el8.noarch               13/37 
[Buildah]   Verifying        : sqlite-3.26.0-4.el8_1.x86_64                         14/37 
[Buildah]   Verifying        : sqlite-3.26.0-3.el8.x86_64                           15/37 
[Buildah]   Verifying        : sqlite-libs-3.26.0-4.el8_1.x86_64                    16/37 
[Buildah]   Verifying        : sqlite-libs-3.26.0-3.el8.x86_64                      17/37 
[Buildah]   Verifying        : bsdtar-3.3.2-8.el8_1.x86_64                          18/37 
[Buildah]   Verifying        : bsdtar-3.3.2-7.el8.x86_64                            19/37 
[Buildah]   Verifying        : sqlite-devel-3.26.0-4.el8_1.x86_64                   20/37 
[Buildah]   Verifying        : sqlite-devel-3.26.0-3.el8.x86_64                     21/37 
[Buildah]   Verifying        : kernel-headers-4.18.0-147.3.1.el8_1.x86_64           22/37 
[Buildah]   Verifying        : kernel-headers-4.18.0-147.el8.x86_64                 23/37 
[Buildah]   Verifying        : systemd-pam-239-18.el8_1.1.x86_64                    24/37 
[Buildah]   Verifying        : systemd-pam-239-18.el8.x86_64                        25/37 
[Buildah]   Verifying        : gdb-gdbserver-8.2-6.el8_0.x86_64                     26/37 
[Buildah]   Verifying        : gdb-gdbserver-8.2-6.el8.x86_64                       27/37 
[Buildah]   Verifying        : wget-1.19.5-8.el8_1.1.x86_64                         28/37 
[Buildah]   Verifying        : wget-1.19.5-7.el8_0.1.x86_64                         29/37 
[Buildah]   Verifying        : git-core-2.18.2-1.el8_1.x86_64                       30/37 
[Buildah]   Verifying        : git-core-2.18.1-4.el8.x86_64                         31/37 
[Buildah]   Verifying        : git-core-doc-2.18.2-1.el8_1.noarch                   32/37 
[Buildah]   Verifying        : git-core-doc-2.18.1-4.el8.noarch                     33/37 
[Buildah]   Verifying        : perl-Git-2.18.2-1.el8_1.noarch                       34/37 
[Buildah]   Verifying        : perl-Git-2.18.1-4.el8.noarch                         35/37 
[Buildah]   Verifying        : git-2.18.2-1.el8_1.x86_64                            36/37 
[Buildah]   Verifying        : git-2.18.1-4.el8.x86_64                              37/37 
[Buildah] Installed products updated.
[Buildah] 
[Buildah] Upgraded:
[Buildah]   systemd-libs-239-18.el8_1.1.x86_64                                            
[Buildah]   setup-2.12.2-2.el8_1.1.noarch                                                 
[Buildah]   systemd-239-18.el8_1.1.x86_64                                                 
[Buildah]   libarchive-3.3.2-8.el8_1.x86_64                                               
[Buildah]   ca-certificates-2019.2.32-80.0.el8_1.noarch                                   
[Buildah]   sqlite-3.26.0-4.el8_1.x86_64                                                  
[Buildah]   sqlite-libs-3.26.0-4.el8_1.x86_64                                             
[Buildah]   bsdtar-3.3.2-8.el8_1.x86_64                                                   
[Buildah]   sqlite-devel-3.26.0-4.el8_1.x86_64                                            
[Buildah]   kernel-headers-4.18.0-147.3.1.el8_1.x86_64                                    
[Buildah]   systemd-pam-239-18.el8_1.1.x86_64                                             
[Buildah]   gdb-gdbserver-8.2-6.el8_0.x86_64                                              
[Buildah]   wget-1.19.5-8.el8_1.1.x86_64                                                  
[Buildah]   git-core-2.18.2-1.el8_1.x86_64                                                
[Buildah]   git-core-doc-2.18.2-1.el8_1.noarch                                            
[Buildah]   perl-Git-2.18.2-1.el8_1.noarch                                                
[Buildah]   git-2.18.2-1.el8_1.x86_64                                                     
[Buildah] 
[Buildah] Installed:
[Buildah]   diffutils-3.6-5.el8.x86_64               libxkbcommon-0.8.2-1.el8.x86_64      
[Buildah]   xkeyboard-config-2.24-3.el8.noarch      
[Buildah] 
[Buildah] Complete!
[Buildah] Last metadata expiration check: 0:01:03 ago on Thu Jan 30 19:53:46 2020.
[Buildah] Dependencies resolved.
[Buildah] ================================================================================
[Buildah]  Package    Arch   Version                                Repository       Size
[Buildah] ================================================================================
[Buildah] Installing:
[Buildah]  python2    x86_64 2.7.16-12.module+el8.1.0+4148+33a50073 ubi-8-appstream 109 k
[Buildah] Installing dependencies:
[Buildah]  python2-libs
[Buildah]             x86_64 2.7.16-12.module+el8.1.0+4148+33a50073 ubi-8-appstream 6.0 M
[Buildah]  python2-setuptools-wheel
[Buildah]             noarch 39.0.1-11.module+el8.1.0+3446+c3d52da3 ubi-8-appstream 289 k
[Buildah]  python2-pip-wheel
[Buildah]             noarch 9.0.3-14.module+el8.1.0+3446+c3d52da3  ubi-8-appstream 1.2 M
[Buildah] Installing weak dependencies:
[Buildah]  python2-pip
[Buildah]             noarch 9.0.3-14.module+el8.1.0+3446+c3d52da3  ubi-8-appstream 2.0 M
[Buildah]  python2-setuptools
[Buildah]             noarch 39.0.1-11.module+el8.1.0+3446+c3d52da3 ubi-8-appstream 643 k
[Buildah] Enabling module streams:
[Buildah]  python27          2.7                                                         
[Buildah] 
[Buildah] Transaction Summary
[Buildah] ================================================================================
[Buildah] Install  6 Packages
[Buildah] 
[Buildah] Total download size: 10 M
[Buildah] Installed size: 39 M
[Buildah] Downloading Packages:
[Buildah] (1/6): python2-2.7.16-12.module+el8.1.0+4148+33 314 kB/s | 109 kB     00:00    
[Buildah] (2/6): python2-setuptools-wheel-39.0.1-11.modul 543 kB/s | 289 kB     00:00    
[Buildah] (3/6): python2-pip-9.0.3-14.module+el8.1.0+3446 2.8 MB/s | 2.0 MB     00:00    
[Buildah] (4/6): python2-libs-2.7.16-12.module+el8.1.0+41 4.3 MB/s | 6.0 MB     00:01    
[Buildah] (5/6): python2-setuptools-39.0.1-11.module+el8. 672 kB/s | 643 kB     00:00    
[Buildah] (6/6): python2-pip-wheel-9.0.3-14.module+el8.1. 504 kB/s | 1.2 MB     00:02    
[Buildah] --------------------------------------------------------------------------------
[Buildah] Total                                           2.9 MB/s |  10 MB     00:03     
[Buildah] Running transaction check
[Buildah] Transaction check succeeded.
[Buildah] Running transaction test
[Buildah] Transaction test succeeded.
[Buildah] Running transaction
[Buildah]   Preparing        :                                                        1/1 
[Buildah]   Installing       : python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52   1/6 
[Buildah]   Installing       : python2-setuptools-wheel-39.0.1-11.module+el8.1.0+34   2/6 
[Buildah]   Installing       : python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.   3/6 
[Buildah]   Installing       : python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.no   4/6 
[Buildah]   Installing       : python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d   5/6 
[Buildah]   Installing       : python2-2.7.16-12.module+el8.1.0+4148+33a50073.x86_6   6/6 
[Buildah]   Running scriptlet: python2-2.7.16-12.module+el8.1.0+4148+33a50073.x86_6   6/6 
[Buildah]   Verifying        : python2-2.7.16-12.module+el8.1.0+4148+33a50073.x86_6   1/6 
[Buildah]   Verifying        : python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.   2/6 
[Buildah]   Verifying        : python2-setuptools-wheel-39.0.1-11.module+el8.1.0+34   3/6 
[Buildah]   Verifying        : python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.no   4/6 
[Buildah]   Verifying        : python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d   5/6 
[Buildah]   Verifying        : python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52   6/6 
[Buildah] Installed products updated.
[Buildah] 
[Buildah] Installed:
[Buildah]   python2-2.7.16-12.module+el8.1.0+4148+33a50073.x86_64                         
[Buildah]   python2-pip-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch                      
[Buildah]   python2-setuptools-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch              
[Buildah]   python2-libs-2.7.16-12.module+el8.1.0+4148+33a50073.x86_64                    
[Buildah]   python2-setuptools-wheel-39.0.1-11.module+el8.1.0+3446+c3d52da3.noarch        
[Buildah]   python2-pip-wheel-9.0.3-14.module+el8.1.0+3446+c3d52da3.noarch                
[Buildah] 
[Buildah] Complete!
[Buildah] 0 files removed
[Buildah] useradd: /etc/passwd.323: lock file already used
[Buildah] useradd: cannot lock /etc/passwd; try again later.
[Buildah] subprocess exited with status 1
[Buildah] subprocess exited with status 1
[Buildah] error building at STEP "RUN yum upgrade --disableplugin=subscription-manager -y  && yum install --disableplugin=subscription-manager python2 -y  && yum clean --disableplugin=subscription-manager packages  && ln -s /usr/bin/python2 /usr/bin/python  && useradd --uid 1000 --gid 0 --shell /bin/bash --create-home node": exit status 1
[Error] exit status 1

Also i tested for another pipeline java-mp build push in this CRC container and for this pipeline the pipelinerun was successfull however it took below time

Pipeline(build-push-pipeline) Buildah image Time
java-mp gireeshpunathil/appsody-buildah:v1 11min
-- -- --
java-mp appsody/appsody-buildah:0.5.6-buildah1.9.0 13min

@aadeshpa
Copy link
Contributor

@marikaj123 : after discussing with @gireeshpunathil he said above nodejs express issue of yum upgrade seems to be separate issue which we saw once in the past for one of the version of appsody/appsody-buildah: . We have created a separate issue for this against the appsody-stack repo

Issue : appsody/stacks#629

@aadeshpa
Copy link
Contributor

aadeshpa commented Feb 3, 2020

@gireeshpunathil : since we were blocked by above issue to test with your image gireeshpunathil/appsody-buildah:v1 we tried just starting standalone container with your image in RHEL8.0 and followed below steps

  1. Created buildah container with the image
    buildah from gireeshpunathil/appsody-buildah:v1

  2. Checked the container

[root@svtcrc-389745-1 lib]# buildah containers
CONTAINER ID  BUILDER  IMAGE ID     IMAGE NAME                       CONTAINER NAME
9fa4b9a96c12     *     1bf9700289a4 registry.access.redhat.com/ubi8/nodejs-10:1-54 nodejs-10-working-container
5d19f7b6eca2     *     05b7c1d1f3e0 docker.io/gireeshpunathil/appsody-buildah:v1 appsody-buildah-working-container
  1. Exec in the container

buildah run -v /var/lib/containers:/var/lib/containers 5d19f7b6eca2 /bin/bash

  1. Initialized nodejs-exp

Appsody init nodejs-loopback(collection 0-5-0)

  1. In same folder where the nodejs exp project was initialized we ran command
appsody build --buildah --buildah-options "--format=docker"
Extracting project from development environment
Pulling docker image docker.io/kabanero/nodejs-express:0.2
Running command: buildah pull docker.io/kabanero/nodejs-express:0.2
60f8beff0a6f1ba2da1820c04f36a93702cea88a33de193cd4059cb9eea7bd8c
[Warning] The stack image does not contain APPSODY_PROJECT_DIR. Using /project
Running command: buildah from --name nodejs-0-5-0-extract -v /nodejs-0-5-0/:/project/user-app docker.io/kabanero/nodejs-express:0.2
Running command: /bin/sh -c x=`buildah mount nodejs-0-5-0-extract`; cp -rf $x//project/* /root/.appsody/extract/nodejs-0-5-0
[Error] buildah mount / copy command failed: exit status 1
Running command: buildah rm nodejs-0-5-0-extract
[Error] buildah mount / copy command failed: exit status 1

So we could verify the test of running just appsody build step manually without pipeline
via your standalone container as well.

@jdmcclur
Copy link

jdmcclur commented Feb 4, 2020

@gireeshpunathil - any idea why it works for you on rhel8 and not @aadeshpa? What is different?

@gireeshpunathil
Copy link

@jdmcclur - one or more of:

  • the tests we ran are different
  • the systems we used may have different fuse-overlay versions

We are in the process of:

  • figuring out which RHEL versions match fedora 30/31 where kernel supports new fuse
  • figuring out earliest known good version of fuse
  • figuring out the right steps to upgrade fuse
  • figuring out which test failures map to fuse issue, and which are not.

@aadeshpa
Copy link
Contributor

aadeshpa commented Feb 5, 2020

@marikaj123 : after discussing with @gireeshpunathil he said above nodejs express issue of yum upgrade seems to be separate issue which we saw once in the past for one of the version of appsody/appsody-buildah: . We have created a separate issue for this against the appsody-stack repo

Issue : appsody/stacks#629

This issue seems to be side-effect of the fuse-overlay issue fix which is not present in the host os where we were testing it which is RHEL8.1 node. Marked it as closed for now. If needed after we know correct environment requirements to test this performance bug issue we can re-open it in collections repo (https://github.com/kabanero-io/collections/issues, not https://github.com/appsody/stacks/issues)and not in the appsody-stack repo where it was created.

@aadeshpa
Copy link
Contributor

aadeshpa commented Feb 6, 2020

@gireeshpunathil : I got another fyre env with single node of ubuntu 18.04.3, where i installed docker and ran your standalone container of gireeshpunathil/appsody-buildah:v1 and followed below steps,

[root@0fa8f723f5b0 nodejs-exp-0-5-0]# exit
exit
root@ub181:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Steps Followed

  1. Ran the image gireeshpunathil/appsody-buildah:v1 using docker as a contianer.
  2. Inside the container
    2.1 created folder nodjes-exp under /root
    2.2 Appsody repo add kab-collections-050 https://github.com/kabanero-io/collections/releases/download/0.5.0/kabanero-index.yaml
    2.3 appsody init nodjes-loopback
    2.4 Ran appsody build --buildah --buildah-options "--format=docker"
    [Buildah] Writing manifest to image destination
    [Buildah] Storing signatures
    [Buildah] 78307f869713b52f1e3437e30dd8ace07ad46bc2f8cb7658ed4df0bc4db0d069
    Built docker image dev.local/nodejs-loopback
    Running command: buildah from --name nodejs-loopback-extract docker.io/kabanero/nodejs-   loopback:0.1
     Running command: /bin/sh -c x=`buildah mount nodejs-loopback-extract`; cp -f $x//config/app-deploy.yaml /root/nodejs-loopback/app-deploy.yaml
    Running command: buildah rm nodejs-loopback-extract
    Created deployment manifest: /root/nodejs-loopback/app-deploy.yaml
     
    

Output : I was able to successfully build the appsody project in 5 to 6 min time. This means first time we could test the fix from @gireeshpunathil in Ubuntu 18.04.3 fyre environment.
cc: @marikaj123 @kvijai82

As a second experiment I tested by running standalone container with old buildah image which we use in pipeline appsody/appsody-buildah:0.5.6-buildah1.9.0 and ran the above steps to ran appsody build command finally. The result was the build was stuck at step 16 , 17, 18 for more than 65 min and threw the below error.

logs snipped

[Buildah] STEP 15: ENV NPM_CONFIG_PREFIX=~/.npm-global
[Buildah] STEP 16: COPY . /project
[Buildah] STEP 17: COPY --from=0 /project/node_modules /project/node_modules
[Buildah] STEP 18: COPY --from=0 /project/user-app/node_modules /project/user-app/node_modules
[Buildah] STEP 19: WORKDIR /project
[Buildah] STEP 20: RUN npm run build  && npm run build --prefix user-app  && chown -hR node:0 /project  && chmod -R g=u /project 
[Buildah] 
[Buildah] > nodejs-loopback@0.1.8 build /project
[Buildah] > lb-tsc
[Buildah] 
[Buildah] 
[Buildah] > nodejs-loopback-scaffold@1.0.0 build /project/user-app
[Buildah] > lb-tsc
[Buildah] 
[Buildah] STEP 21: ENV NODE_ENV production
[Buildah] STEP 22: ENV PORT 3000
[Buildah] STEP 23: USER node
[Buildah] STEP 24: CMD ["npm", "start"]
[Buildah] STEP 25: COMMIT dev.local/nodejs-loopback
[Buildah] time="2020-02-06T20:03:50Z" level=error msg="error unmounting /var/lib/containers/storage/overlay/f5deb5c16f3ef0e30b6ca4f2b5bbe3680a615f496cc74feb109c95c9f3e3b90d/merged: no such file or directory" 
[Buildah] error committing container for step {Env:[PORT=3000 NODE_ENV=production NPM_CONFIG_PREFIX=~/.npm-global PATH=/opt/app-root/src/node_modules/.bin/:/opt/app-root/src/.npm-global/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin container=oci SUMMARY=Platform for building and running Node.js 10 applications DESCRIPTION=Node.js 10 available as container is a base platform for building and running various Node.js 10 applications and frameworks. Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. STI_SCRIPTS_URL=image:///usr/libexec/s2i STI_SCRIPTS_PATH=/usr/libexec/s2i APP_ROOT=/opt/app-root HOME=/opt/app-root/src PLATFORM=el8 NODEJS_VER=10 NODEJS_VERSION=10 NPM_RUN=start NAME=nodejs NPM_CONFIG_PREFIX=/opt/app-root/src/.npm-global    NPM_CONFIG_PREFIX=~/.npm-global NODE_ENV=production PORT=3000] Command:cmd Args:[npm start] Flags:[] Attrs:map[json:true] Message:CMD npm start Original:CMD ["npm", "start"]}: error copying layers and metadata for container "5a95416e497db0a7f227d680d506bec41feef92a9e85cbd65f2847e8e6cd5ec3": Error initializing source containers-storage:nodejs-10-working-container-1: error extracting layer "a7991287f82a01904b70b9a8b31fec16d28b3a20fbf2e41e42bdad6e97ec819f": error creating overlay mount to /var/lib/containers/storage/overlay/f5deb5c16f3ef0e30b6ca4f2b5bbe3680a615f496cc74feb109c95c9f3e3b90d/merged: using mount program /usr/bin/fuse-overlayfs: fuse: failed to access mountpoint /var/lib/containers/storage/overlay/f5deb5c16f3ef0e30b6ca4f2b5bbe3680a615f496cc74feb109c95c9f3e3b90d/merged: No such file or directory
[Buildah] fuse-overlayfs: cannot mount: No such file or directory
[Buildah] : exit status 1
[Error] exit status 1

@kvijai82
Copy link
Contributor

kvijai82 commented Feb 7, 2020

One more datapoint. I drove the pipeline against the appsody nodejs loopback stack which is built on top of Ubuntu. Thought we would avoid the yum upgrade issue in this and get further but unfortunately it also failed pretty early.

[Buildah] Ign:1 http://deb.debian.org/debian stretch InRelease
[Buildah] Get:2 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
[Buildah] Get:3 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
[Buildah] Get:4 http://deb.debian.org/debian stretch Release [118 kB]
[Buildah] Get:5 http://deb.debian.org/debian stretch Release.gpg [2365 B]
[Buildah] Get:6 http://deb.debian.org/debian stretch-updates/main amd64 Packages [27.9 kB]
[Buildah] Get:7 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [517 kB]
[Buildah] Get:8 http://deb.debian.org/debian stretch/main amd64 Packages [7086 kB]
[Buildah] Fetched 7937 kB in 8s (936 kB/s)
[Buildah] Reading package lists...
[Buildah] Reading package lists...
[Buildah] Building dependency tree...
[Buildah] Reading state information...
[Buildah] Calculating upgrade...
[Buildah] The following packages will be upgraded:
[Buildah]   libexif-dev libexif12
[Buildah] 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[Buildah] Need to get 663 kB of archives.
[Buildah] After this operation, 1024 B disk space will be freed.
[Buildah] Get:1 http://security.debian.org/debian-security stretch/updates/main amd64 libexif-dev amd64 0.6.21-2+deb9u1 [340 kB]
[Buildah] Get:2 http://security.debian.org/debian-security stretch/updates/main amd64 libexif12 amd64 0.6.21-2+deb9u1 [323 kB]
[Buildah] debconf: delaying package configuration, since apt-utils is not installed
[Buildah] Fetched 663 kB in 0s (927 kB/s)
(Reading database ... 29962 files and directories currently installed.)
[Buildah] Preparing to unpack .../libexif-dev_0.6.21-2+deb9u1_amd64.deb ...
[Buildah] Unpacking libexif-dev (0.6.21-2+deb9u1) over (0.6.21-2+b2) ...
[Buildah] dpkg: error processing archive /var/cache/apt/archives/libexif-dev_0.6.21-2+deb9u1_amd64.deb (--unpack):
[Buildah]  error setting timestamps of '/usr/lib/x86_64-linux-gnu/libexif.so.dpkg-new': Permission denied
[Buildah] Preparing to unpack .../libexif12_0.6.21-2+deb9u1_amd64.deb ...
[Buildah] Unpacking libexif12:amd64 (0.6.21-2+deb9u1) over (0.6.21-2+b2) ...
[Buildah] dpkg: error processing archive /var/cache/apt/archives/libexif12_0.6.21-2+deb9u1_amd64.deb (--unpack):
[Buildah]  error setting timestamps of '/usr/lib/x86_64-linux-gnu/libexif.so.12.dpkg-new': Permission denied
[Buildah] Errors were encountered while processing:
[Buildah]  /var/cache/apt/archives/libexif-dev_0.6.21-2+deb9u1_amd64.deb
[Buildah]  /var/cache/apt/archives/libexif12_0.6.21-2+deb9u1_amd64.deb
[Buildah] E: Sub-process /usr/bin/dpkg returned an error code (1)
[Buildah] subprocess exited with status 100
[Buildah] subprocess exited with status 100
[Buildah] error building at STEP "RUN apt-get update  && apt-get dist-upgrade -y  && apt-get clean  && echo 'Finished installing dependencies'": exit status 100
[Error] exit status 1

@marikaj123
Copy link
Member

Need to conect with RH.

@aadeshpa
Copy link
Contributor

One of the replies from above ticket:

Message (Associate)
Hunsaker, Jake on Feb 10 2020 at 02:03 PM -05:00

Hello,

My name is Jake and I am a senior member of the containerization team and I am assisting on this case.

With regards to fuse-overlay, it is currently not shipping in RHEL. However, it is scheduled to release with RHEL 7.8 in the RHEL Extras repository. I do not have a shareable ETA for the 7.8 release, however I have added this case to the bug report tracking the release of that package so that we may continue to provide updates on that front.

Regards,

Jake Hunsaker, RHCA Infrastructure II
Principal Container Support Engineer
Red Hat Global Support Services
North America Region

@aadeshpa
Copy link
Contributor

aadeshpa commented Feb 17, 2020

@gireeshpunathil : I tested by following the steps from this issue as you posted : containers/buildah#2047
To measure the time taken to copy

a) multiple folders and files after creating them

[root@svtcrc-389745-1 test_copy_multiple_small_folders]# find ./foo | wc -l
2111
[root@svtcrc-389745-1 test_copy_multiple_small_folders]# du -ms .
4 .

Results
real 3m7.104s
user 1m8.657s
sys 0m32.015s

b) copy tar ball of multiple folder structure from point a)

Result:
real 0m2.151s
user 0m0.466s
sys 0m0.330s

c) copy single 5MB file in txt format
Result:
real 0m2.947s
user 0m0.752s
sys 0m0.420s

d) copy single tar file the above point c) 5MB txt file format
Result:-

real 0m2.239s
user 0m0.474s
sys 0m0.315s

NOTE: As shown in point a result it took 3 min for 2111 folders and files in them to copy, and when I zipped it as tar ball in point b) the copy result took around 2 seconds.

cc: @kvijai82

@aadeshpa
Copy link
Contributor

@marikaj123 : We had call with @kvijai82 @gireeshpunathil and @neeraj.laad@uk.ibm.com and Neeraj said they will try to make some copy command changes in the Appsody Stack Docker file to optimize it ,and we will be having a checkpoint with them on Thursday.

Docker file :
https://github.com/appsody/stacks/blob/master/incubator/nodejs-loopback/image/project/Dockerfile

@aadeshpa
Copy link
Contributor

aadeshpa commented Feb 19, 2020

We got some help from @neeraj.laad@uk.ibm.com where he gave us updated appsody nodejs-loopback stack image which has updated COPY commands in dockerfile. I tried to test it with appsody build in appsody/appsody-buildah:0.5.8-buildah1.9.0 container with the appsody project nodejs-loopback and the result was the build was complete in below time.

Result
real 8m0.865s

However when we tried updating the Dockerfile for nodejs-loopback collections stack and build image out of it and then tried to do appsody build in appsody/appsody-buildah:0.5.8-buildah1.9.0 container, it gets stuck at below step.

[Buildah] Complete!
[Buildah] 0 files removed
[Buildah] STEP 14: RUN mkdir ~/.npm-global
[Buildah] STEP 15: ENV NPM_CONFIG_PREFIX=~/.npm-global
[Buildah] STEP 16: COPY src /project/src
[Buildah] STEP 17: COPY *.* /project/
[Buildah] STEP 18: COPY Dockerfile /project/
[Buildah] STEP 19: COPY user-app /project/user-app/ 

@aadeshpa
Copy link
Contributor

After the discussion today, @groeges confirmed that nodejs-loopback collection stack is not going to get used from kabanero 0-6-0 so , we are not investigating on nodejs-loopback collection.

We are shifting gears to investigate whether there can me any changes made in nodjes-express and nodejs collection stack Dockerfile to increase their build performance from the help of @neeraj.laad@uk.ibm.com and appsody team.

Today I will try to test modified nodejs-express collection stack image and note the time taken to just run appsody build of the project from the standalone container appsody/appsody-buildah:0.5.8-buildah1.9.0

@aadeshpa
Copy link
Contributor

aadeshpa commented Feb 20, 2020

Test in standalone container appsody/appsody-buildah:0.5.8-buildah1.9.0
1)
Original 0.6.0rc2 nodejs-collection with below appsody config file

bash-5.0# cat .appsody-config.yaml
project-name: nodejs-express-060
stack: docker.io/kabanerobeta/nodejs-express:0.2
With this when i did appsody build --buildah --buildah-options "--format=docker"

Result

Built docker image dev.local/nodejs-express-060
Running command: buildah from --name nodejs-express-060-extract docker.io/kabanerobeta/nodejs-express:0.2
Running command: /bin/sh -c x=`buildah mount nodejs-express-060-extract`; cp -f $x//config/app-deploy.yaml /nodejs-express-060/app-deploy.yaml
Running command: buildah rm nodejs-express-060-extract
Created deployment manifest: /nodejs-express-060/app-deploy.yaml

real	12m23.407s
user	7m37.285s
sys	3m43.267s 
  1. With my updated COPY commands nodejs-collection 0-6-0rc2 updated image
[root@6088dda3ea3d nodejs-exp-060]# cat .appsody-config.yaml
project-name: nodejs-exp-060
stack: docker.io/aadeshpa/ashish-nj-exp-col-060-build:buildahv2
When i did `appsody build --buildah --buildah-options "--format=docker"`

Result

[Buildah] Writing manifest to image destination
[Buildah] Storing signatures
[Buildah] afe1d9e09e614990e83cf7716795c24b7030f2caefb2fc111b7800f89dba472e
Built docker image dev.local/nodejs-express-060
Found existing deployment manifest /nodejs-express-060/app-deploy.yaml
Updated existing deployment manifest /nodejs-express-060/app-deploy.yaml

real	4m5.739s
user	1m52.258s
sys	0m37.916s
bash-5.0# ls -la

there seems to be significant difference with just my COPY commands changes. from 12 min to 4 min.

@gireeshpunathil @kvijai82 @marikaj123

@aadeshpa
Copy link
Contributor

aadeshpa commented Feb 20, 2020

@steven.groeger @kilnerm: Performance bug fix in Nodejs and Nodejs-express stacks

Summary:
We found out the nodejs , nodejs-express stacks was taking long time in build step, because the Dockerfile for those stacks in Appsody project had single COPY command for whole project and dependency folders. We tried to break it down into logical Sub directory copy commands and @neeraj.laad helped creating the Appsody stack changes which we tried and it gave significant performance by reducing the appsody build step time from 12 min to 4min .

Then I incorporated that COPY changes in our Kabanero Collections repository nodejs-express stack and created my own image , which I used it in testing the build step and also via kabanero build push pipelinerun . There was significant reduce in pipelinerun time to almost half the original run time.

Original build-push-pipelinerun without the changes in the nodejs-express collection stack image

NAME                         SUCCEEDED   REASON      STARTTIME   COMPLETIONTIME
test21-manual-pipeline-run   True        Succeeded   18m23s         

build-push-pipelinerun with fixed nodejs-express collection stack image

NAME                         SUCCEEDED   REASON      STARTTIME   COMPLETIONTIME
test21-manual-pipeline-run   True        Succeeded   8m26s       0s
[root@bristol-inf sample-helper-files]# 

Below are the pull request in Appsody stack from @neeraj.laad
appsody/stacks#680
appsody/stacks#679

@aadeshpa
Copy link
Contributor

aadeshpa commented Feb 20, 2020

Final action required to incoporate the fix @kilnerm @groeges :-
Can this change be incorporated in our Collections repository nodes and nodejs-express stack ?
cc: @marikaj @kalathur @gireesh

@groeges
Copy link

groeges commented Feb 21, 2020

PR for the nodejs and nodejs-express Dockerfile changes to improve performance:
kabanero-io/collections#286 and kabanero-io/collections#293 and kabanero-io/collections#292

@tam512
Copy link
Author

tam512 commented Feb 25, 2020

Verified in Kabanero 0.6.0-rc.5. I could build nodejs and nodejs express pipelines
Screen Shot 2020-02-25 at 12 49 52 PM
in less than 10 minutes

@tam512 tam512 closed this as completed Feb 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.