Skip to content

install package error: npm-3.5.2 install of alarmFeed in alarm package gives ENOTDIR error #5260

Closed
@hugy718

Description

@hugy718

Environment details:

local deployment on self-built kubernetes cluster
Kubernetes version: 1.23.3
ubuntu version: 20.04.4 LTS (kernel: Linux 5.13.0-51-generic)

Steps to reproduce the issue:

  1. use the openwhisk-deploy-kube project provided helm charts to install openwhisk
  2. all other pods are ok, but the owdev-install-packages keeps failing

I had labeled my node as invoker.

Provide the expected results and outputs:

owdev-install-packages pod has status Completed

Provide the actual results and outputs:

owdev-install-packages pod has status Completed

Additional information you deem important:

This happened last week when re-deploy openwhisk.
After doing some investigation, I found the problem is the npm package install for alarm package. I inspected the log of the failing pods and successfully reproduced issue by interactively launching the container. The owdev-install-package pod uses container image by openwhisk/tols/ow-utils/Dockerfile. The npm installed by apt has the version:

{ npm: '3.5.2',
  ares: '1.14.0',
  cldr: '32.0.1',
  http_parser: '2.7.1',
  icu: '60.2',
  modules: '57',
  nghttp2: '1.30.0',
  node: '8.10.0',
  openssl: '1.0.2n',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.18.0',
  v8: '6.2.414.50',
  zlib: '1.2.11' }

Install fails for the openwhisk-deploy-kube/helm/openwhisk/configMapFiles/installPackages/myTask.sh at L104

#####
# Install the catalog for the Alarm provider
#####

if [ "$OW_INSTALL_ALARM_PROVIDER" == "yes" ]; then
    cd /
    git clone https://github.com/apache/openwhisk-package-alarms.git

    pushd /openwhisk-package-alarms
        git checkout $OW_GIT_TAG_OPENWHISK_PACKAGE_ALARMS
        ./installCatalog.sh $WHISK_AUTH $WHISK_API_HOST_URL $WHISK_API_HOST_URL worker0 $PROVIDER_DB_URL $ALARM_DB_PREFIX || exit 1
    popd
fi

Looking at the log of failed pod, problem is the npm install command at L95 in openwhisk-package-alarms/installCatalog.sh

cp -f alarmFeed_package.json package.json
npm install

The output:

[email protected] /openwhisk-package-alarms/action
├── @types/[email protected]  extraneous
├── @types/[email protected]  extraneous
├── [email protected]  extraneous
├── [email protected]  extraneous
├── [email protected]  extraneous
└─┬ [email protected] 
  ├─┬ [email protected] 
  │ └── [email protected] 
  ├─┬ [email protected] 
  │ └── [email protected] 
  └── [email protected] 

npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm ERR! Linux 5.13.0-51-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! path /openwhisk-package-alarms/action/node_modules/.staging/@types/node-7154234c/package.json
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall open

npm ERR! ENOTDIR: not a directory, open '/openwhisk-package-alarms/action/node_modules/.staging/@types/node-7154234c/package.json'
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /openwhisk-package-alarms/action/npm-debug.log

That seems to be an issue of using old version of npm. A recent issue under npm/cli here also report their application suddenly broke last week.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions