From d53f72407e031cbf65b16f6a9c98edd923500a72 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 20 Mar 2019 10:54:22 -0700 Subject: [PATCH] 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 --- manifests/init.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index f7bc037..166adfe 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -299,7 +299,8 @@ class openstackid ( # force 10.x version class { '::nodejs': - repo_url_suffix => '10.x', + repo_url_suffix => '10.x', + legacy_debian_symlinks => false, } group { 'openstackid':