Encountering the error "oom kill count retrieval failed" on a Gitlab runner instance provisioned using the Gitlab Operator for a vuejs App

Currently, I am in the process of setting up a gitlab ci/cd pipeline for a vuejs application. The Gitlab runner has been provisioned using the Gitlab operator within an Openshift environment. In order to get a docker image of the application, I am utilizing the buildah tool to construct the docker image from the vuejs application.

After installing buildah on the Gitlab runner and ensuring it can access the Dockerfile from the parent directory, issues arise when the runner encounters the npm install command within the Dockerfile, resulting in the following error. Attempts have been made to add config.toml files and increase memory allocated to the runner, but so far no solutions have been successful.

.gitlab-ci.yml

image: imagesite.com/fedora:latest

variables:
  KUBERNETES_CPU_REQUEST: 3
  KUBERNETES_CPU_LIMIT: 5
  KUBERNETES_MEMORY_REQUEST: 2Gi
  KUBERNETES_MEMORY_LIMIT: 4Gi
  STORAGE_DRIVER: vfs
  BUILDAH_FORMAT: docker
  BUILDAH_FILE: Dockerfile
  GIT_SSL_NO_VERIFY: 1
  IMAGE_BUILD: buildah build-using-dockerfile
                       --format docker
                       --file Dockerfile
                       --tag
build:
  stage: build
  tags:
    - cu-admin
  script:
    - pwd
    - dnf -y install runc buildah
    - buildah images
    - echo $REGISTRY_LOGIN
    - $REGISTRY_LOGIN
    - $IMAGE_BUILD myvuejsapp:latest .

Dockerfile:

FROM node:16.1.0-slim AS NPM_BUILD
WORKDIR /app
COPY ./package.json package.json
COPY ./.env.production.local .env.production.local
COPY ./package-lock.json package-lock.json
COPY ./public public
COPY ./src src
RUN npm install
RUN npm run build

FROM nginx:1.17
COPY ./nginx.conf /etc/nginx/nginx.conf
WORKDIR /code
COPY --from=NPM_BUILD /app/dist .

EXPOSE 8082:8082
CMD ["nginx", "-g", "daemon off;"]

Error encountered by Runner during Build:

STEP 8: RUN npm install
error running container: error from runc creating container for [/bin/sh -c npm install]: time="2021-07-30T07:47:54Z" level=warning msg="unable to get oom kill count" error="no directory specified for memory.oom_control"
time="2021-07-30T07:47:54Z" level=error msg="container_linux.go:380: starting container process caused: process_linux.go:385: applying cgroup configuration for process caused: mkdir /sys/fs/cgroup/cpuset/buildah-buildah541202824: read-only file system"
: exit status 1
error building at STEP "RUN npm install": error while running runtime: exit status 1
time="2021-07-30T07:47:54Z" level=error msg="exit status 1"

Seeking assistance in resolving the above error and successfully completing the npm installation.

Answer №1

Consider attempting

buildhah --isolation chroot

Answer №2

Encountering a similar issue, I faced an error when attempting to execute dnf install while constructing an image within a container. Although the previous solution was beneficial, it contained erroneous syntax... --isolation should be utilized as an option for the build subcommand rather than directly with buildah.

Consider using the following:

buildah build --isolation chroot <include additional arguments here>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the process for starting my nodejs application using nodemon?

Issue I apologize for this beginner question, but I've been struggling with it for a while now. I'm working on a project to build a Backend API that reads data from a CSV file and saves it in a database as part of a student portal assignment. T ...

I encountered an issue while running mix ecto.create - Postgrex.Protocol (#PID<0.208.0>) was unable to establish a connection. Any ideas on how to troubleshoot this

While attempting to create a test Phoenix application by following the instructions on the official Phoenix website: . Upon reaching the step of actually creating the Phoenix application (i.e., running "mix phx.new myhello"), I encountered an issue where ...

Guide to utilizing @types/node in a Node.js application

Currently, I am using VSCode on Ubuntu 16.04 for my project. The node project was set up with the following commands: npm init tsc --init Within this project, a new file named index.ts has been created. The intention is to utilize fs and readline to read ...

How to set up and utilize an npm (Node.js) module on a Windows 2008 server

Looking for some guidance - how can I fix this issue? Everything is running smoothly on my Windows 7 laptop, but encountering errors on the Windows 2008 server. Here's what's set up: 1. ASP.NET Core App and NodeServices being used on Windows Ser ...

Troubleshooting issue with linking Firestack in React Native

Having some trouble with integrating firestack into my react-native project. I followed these steps: Ran npm install react-native-firestack --save But when I attempted to link it: Ran react-native link react-native-firestack I encountered this erro ...

The passing of NODE_ENV from ECS Fargate to the React Application seems to be unsuccessful

I recently completed building a React application using Create-React-App. As part of the deployment process, I configured GitHub Actions to trigger a Docker Build and upload the build to AWS whenever I commit to the 'pre-production' branch. Belo ...

Encountering the error message 'array expected for services config' within my GitLab CI/CD pipeline

My goal is to set up a pipeline in GitLab for running WebdriverIO TypeScript and Cucumber framework tests. I am encountering an issue when trying to execute wdio.conf.ts in the pipeline, resulting in this error: GitLab pipeline error Below is a snippet of ...

Upgrade to the most recent version of Polymer and npm

It seems like this question is more related to npm rather than Polymer. I have been working on a substantial Polymer project, currently at version 1.3.0 as indicated in the bower.json file within the Polymer directory. After being away from the project fo ...

What sets npm install apart from npm update?

Can you explain the real distinction between npm install and npm update? In what situations should I opt for each one? ...

Transform a log file into a JSON structure

In my log file titled request.log, the following entries are present: [2022-06-30T09:56:40.146Z] ### POST https://test.csdf/auth/send_otp { "method": "POST", "headers": { "User-Agent": "testing&q ...

Avoid NPM removing the symlinked node_modules directory during installation

I utilize a deployment service to deploy my LEMP application's code; running on Ubuntu 20.04 / AWS. Node has been installed via NVM, with Node v19.6.1 & NPM v9.4.0 being used. My deployment process involves symlinking to connect a /current/ directory ...

Check out the latest enhancements to React and Flask Fullstack right from your web browser

Recently, I ventured into the world of React and Flask development by following a tutorial found at this link. After completing the example fullstack website project, I realized that my code mirrored exactly what was provided by the author on their Github ...

I am experiencing difficulties with my Angular 8 NPM package as it is unable to locate its own

I am encountering an issue where my assets are successfully copied over to my scoped npm package, but they are not available after the application is served. Currently, the images in my application are searching for a path like this: https://localhost:420 ...

The Angular CLI has encountered an issue - Syntax Error: Unexpected token {

After using Angular CLI to successfully create projects for some time, I encountered an issue today when attempting to serve a new project. ng serve Unexpected token { SyntaxError: Unexpected token { at exports.runInThisContext (vm.js:53:16) at Modu ...

Exploring the compatibility of Husky with Typicode using Yarn

Currently, I have implemented the use of husky to configure git hooks for prettier. However, I am facing a persistent issue whenever I attempt to commit or push: > husky - Can't find npm in PATH. Skipping precommit script in package.json My curre ...

How to set up npm to utilize the maven directory format and deploy war files

Embarking on my very first pure front-end project, I decided to deploy it using Java/Maven. To begin, I set up a standard WAR project: │ package.json │ pom.xml │ tsconfig.json │ typings.json │ │ ├───src │ └───main ...

Generating a unique user ID similar to Zerodha's user ID using Node.js/JavaScript

For a project I'm working on, I need to create random and unique User IDs. I came across Zerodha's user IDs which are easy to remember. In Zerodha user IDs: The first two characters are always letters followed by four numbers. I want to generat ...

error encountered in node.js express route.get() function

I have used express-generator and installed the necessary dependencies. The only thing I've changed is the app.js file, which I have included here. Upon running npm start, I encountered an error. I have provided both the error message and the app.js ...

Error loading resource in Vue npm run serve: net::ERR_CONTENT_LENGTH_MISMATCH

I am encountering the following error message in Google Chrome console: Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH chunk-vendors.js:1 This results in a blank page when attempting to load a Vue development page initiated with: user@ubuntu:~# ...

What is the most efficient way to ensure every dependency in package.json is updated to the most recent version available

I recently brought over the package.json file from another project and now I want to update all of the dependencies to their latest versions since this is a new project and I'm willing to troubleshoot any issues that may arise. Is there an easy way t ...