Browse Source

Disable legacy nodejs symlinks

We currently setup a symlink loop between /usr/bin/node and
/usr/bin/nodejs. This seems to happen due to a mismatch in expectations
between nodesource packaging and our nodejs puppet module. Thankfully
the puppet module allows us to disable the symlinking behavior [0].
We've successfully used this method on the etherpad servers so apply it
to openstackid as well.

[0] https://github.com/voxpupuli/puppet-nodejs/tree/v2.3.0#legacy_debian_symlinks

Debugging notes:

Symlink loop:

  clarkb@openstackid-dev01:~$ ls -al /usr/bin/node
  lrwxrwxrwx 1 root root 15 Mar 18 23:54 /usr/bin/node -> /usr/bin/nodejs
  clarkb@openstackid-dev01:~$ ls -al /usr/bin/nodejs
  lrwxrwxrwx 1 root root 24 Mar 18 23:32 /usr/bin/nodejs -> /etc/alternatives/nodejs
  clarkb@openstackid-dev01:~$ ls -al /etc/alternatives/nodejs
  lrwxrwxrwx 1 root root 13 Mar 18 23:32 /etc/alternatives/nodejs -> /usr/bin/node

Package contents:

  clarkb@openstackid-dev01:~$ dpkg -L nodejs | grep /usr/bin
  /usr/bin
  /usr/bin/node
  /usr/bin/npx
  /usr/bin/npm

Puppet logs:

  Mar 18 23:54:39 openstackid-dev01 puppet-user[19866]: (/Stage[main]/Nodejs::Install/File[/usr/bin/node]/ensure) ensure changed 'file' to 'link'
  Mar 18 23:54:39 openstackid-dev01 puppet-user[19866]: (/Stage[main]/Nodejs::Install/File[/usr/share/man/man1/node.1.gz]/ensure) ensure changed 'file' to 'link'

Change-Id: Ib77b851e12a4f94b5853b1b9e981f898c0ad36f1
Clark Boylan 1 month ago
parent
commit
d53f72407e
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      manifests/init.pp

+ 2
- 1
manifests/init.pp View File

@@ -299,7 +299,8 @@ class openstackid (
299 299
 
300 300
   # force 10.x version
301 301
   class { '::nodejs':
302
-    repo_url_suffix => '10.x',
302
+    repo_url_suffix        => '10.x',
303
+    legacy_debian_symlinks => false,
303 304
   }
304 305
 
305 306
   group { 'openstackid':

Loading…
Cancel
Save