sclorg / container-common-scripts

Apache License 2.0
20 stars 45 forks source link

Fix for 'ct_doc_content_old' and grep #249

Closed phracek closed 2 years ago

phracek commented 2 years ago

This causes problems in Fedora hosts systems. See the error here: https://artifacts.dev.testing-farm.io/d0a22c42-da90-43bf-9523-786a274e68ee

ERROR: File /help.1 does not include 'MYSQL\_ROOT\_PASSWORD'.

The function is now used only in two containers: mariadb-container and mysql-container. postgresql-container solve it by own way https://github.com/sclorg/postgresql-container/blob/master/test/run_test#L694

Changing the grep -F to grep -E solves the issue.

From man grep:

   Pattern Syntax
       -E, --extended-regexp
              Interpret PATTERNS as extended regular expressions (EREs, see below).

       -F, --fixed-strings
              Interpret PATTERNS as fixed strings, not regular expressions.

   Matching Control
       -e PATTERNS, --regexp=PATTERNS
              Use  PATTERNS  as  the patterns.  If this option is used multiple times or is combined with the -f (--file) option, search for all patterns given.
              This option can be used to protect a pattern beginning with “-”.

Option -F is against -e.

Signed-off-by: Petr "Stone" Hracek phracek@redhat.com

phracek commented 2 years ago

Please review @pkubatrh @hhorak

phracek commented 2 years ago

[test]

phracek commented 2 years ago

[test]

hhorak commented 2 years ago

LGTM

phracek commented 2 years ago

From the full tmt log https://artifacts.dev.testing-farm.io/136c08f4-f5c8-4988-8f36-ac4b7fa61428/work-fedora7KFD5Q/log.txt

There is a problem with Nodejs Fedora image:

10:50:55                 out: 
10:50:55                 out: Tests for quay.io/f35/nodejs:14 succeeded.
10:50:55                 out: -> Image for version 14-minimal not built, skipping tests.
10:52:22                 out: npm notice 
10:52:22                 out: npm notice New minor version of npm available! 8.5.0 -> 8.7.0
10:52:22                 out: npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.7.0>
10:52:22                 out: npm notice Run `npm install -g npm@8.7.0` to update!
10:52:22                 out: npm notice 
10:52:24                 out: hint: Using 'master' as the name for the initial branch. This default branch name
10:52:24                 out: hint: is subject to change. To configure the initial branch name to use in all
10:52:24                 out: hint: of your new repositories, which will suppress this warning, call:
10:52:24                 out: hint: 
10:52:24                 out: hint:     git config --global init.defaultBranch <name>
10:52:24                 out: hint: 
10:52:24                 out: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
10:52:24                 out: hint: 'development'. The just-created branch can be renamed via this command:
10:52:24                 out: hint: 
10:52:24                 out: hint:     git branch -m <name>
10:52:24                 out: Initialized empty Git repository in /tmp/sclorg/container-common-scripts/s2i-nodejs-container/test/test-app/.git/
10:52:24                 out: [master (root-commit) 27ffb01] Sample commit
10:52:24                 out:  5 files changed, 130 insertions(+)
10:52:24                 out:  create mode 100644 README.md
10:52:24                 out:  create mode 100644 iisnode.yml
10:52:24                 out:  create mode 100644 package.json
10:52:24                 out:  create mode 100644 server.js
10:52:24                 out:  create mode 100644 web.config
10:52:24                 out: Testing the production image build
10:52:24                 out: 
                    Sending build context to Docker daemon  71.17kB

10:52:24                 out: Step 1/8 : FROM quay.io/f35/nodejs:16
10:52:24                 out:  ---> 8670ca85eaa0
10:52:24                 out: Step 2/8 : LABEL "io.openshift.s2i.build.image"="quay.io/f35/nodejs:16"       "io.openshift.s2i.build.source-location"="file:///tmp/sclorg/container-common-scripts/s2i-nodejs-container/test/test-app"
10:52:38                 out:  ---> Running in b2c0f87e030c
10:52:47                 out: Removing intermediate container b2c0f87e030c
10:52:47                 out:  ---> e51fa7c53713
10:52:47                 out: Step 3/8 : USER root
10:52:54                 out:  ---> Running in 753b7a4b09ec
10:53:03                 out: Removing intermediate container 753b7a4b09ec
10:53:03                 out:  ---> 229ae5222e58
10:53:03                 out: Step 4/8 : COPY upload/src/ /tmp/src
10:53:04                 out:  ---> 3a76e9eedc91
10:53:04                 out: Step 5/8 : RUN chown -R 1001:0 /tmp/src
10:53:11                 out:  ---> Running in 0d1903646d10
10:53:24                 out: Removing intermediate container 0d1903646d10
10:53:24                 out:  ---> a65f2b703a62
10:53:24                 out: Step 6/8 : USER 1001
10:53:31                 out:  ---> Running in 6219daafb9a9
phracek commented 2 years ago

For RHEL8 case. Test exceeced:

11:02:29                 out: 
11:02:29                 out: [INFO] Testing the image SCL enable
11:02:29                 out: 
11:02:31             Command returned '124'.
11:02:31             Test duration '3h' exceeded.
zmiklank commented 2 years ago

For RHEL8 case. Test exceeced:

11:02:29                 out: 
11:02:29                 out: [INFO] Testing the image SCL enable
11:02:29                 out: 
11:02:31             Command returned '124'.
11:02:31             Test duration '3h' exceeded.

Could it be bacause of this? :

Trying to pull quay.io/centos7/ruby-24-centos7...
  unauthorized: access to the requested resource is not authorized