Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hugy718 opened this issue Jun 21, 2022 · 5 comments

Comments

@hugy718
Copy link
Contributor

hugy718 commented Jun 21, 2022

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:

alarmFeed@1.0.0 /openwhisk-package-alarms/action
├── @types/caseless@0.12.2  extraneous
├── @types/tough-cookie@4.0.2  extraneous
├── cloudant-follow@0.18.2  extraneous
├── errs@0.3.2  extraneous
├── form-data@2.5.1  extraneous
└─┬ needle@2.3.2 
  ├─┬ debug@3.2.7 
  │ └── ms@2.1.2 
  ├─┬ iconv-lite@0.4.24 
  │ └── safer-buffer@2.1.2 
  └── sax@1.2.4 

npm WARN alarmFeed@1.0.0 No description
npm WARN alarmFeed@1.0.0 No repository field.
npm WARN alarmFeed@1.0.0 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.

@hugy718
Copy link
Contributor Author

hugy718 commented Jun 21, 2022

It can be fixed by using a newer version of npm in the docker image of ow-utils. Configuring the helm charts in openwhisk-deploy-kube to use the updated image, I have successfully deployed it as before.

@style95
Copy link
Member

style95 commented Jun 21, 2022

Thank you for reporting this.
Why don't you contribute the change to fix the issue as you already clearly analyzed the culprit?

@hugy718
Copy link
Contributor Author

hugy718 commented Jun 21, 2022

Thank you for reporting this. Why don't you contribute the change to fix the issue as you already clearly analyzed the culprit?

Sure. I'd love to :). Opened a PR here #5261. As for the contribution guideline, I have submitted signed Apache CLA, waiting for the reply.

@hugy718
Copy link
Contributor Author

hugy718 commented Jun 24, 2022

Update of image tags at openwhisk-deploy-kube helm charts has been merged.

@hugy718 hugy718 closed this as completed Jun 24, 2022
@style95
Copy link
Member

style95 commented Jun 24, 2022

@hugy718 Nice! Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants