Closed MichaelMackus closed 6 years ago
NOTE: the yarn
package I'm installing doesn't seem to matter, it is just showing the underlying issue of the circular symlink created by puppet-nodejs. The relevant lines (that shouldn't be happening) are the first 2 lines in the output log above. Node.js is working before this point, and if puppet-nodejs can be stopped from creating the circular symlink this issue will be solved.
Also note, the first provision installs Node.js & NPM correctly. Here are the relevant output lines after the first provision:
Notice: /Stage[main]/Nodejs::Install/File[/usr/bin/node]/ensure: created
Notice: /Stage[main]/Nodejs::Install/File[/usr/share/man/man1/node.1.gz]/ensure: created
Notice: /Stage[main]/Nodejs::Install/Package[nodejs]/ensure: created
Afterwards, if I run provision again, it puts the system in an invalid state. This is even more so annoying since apt-get remove nodejs
doesn't work due to the circular symlinks (which have to be manually removed first).
@MichaelMackus We dropped symlink management in #347 , which is in 5.0.0. Can verify the source and version of the module that you are using?
Hmm. I'm using 5.0.0 of puppet-nodejs, commit SHA c77134280b7e30f3c8a94448e04de5c238e6c89c - looks like that's the latest commit according to Github.
OK that was weird! Looks like my puppet module inside the container was different than the one on my host (which is 5.0.0). I did a quick update of the module, and everything is working as expected now!
Sorry for the false alarm. In any case, glad this is figured out, was a huge annoyance.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
class { '::nodejs' }
What are you seeing
First provision, everything works fine. Second time I provision the server (no matter what combination of repo_url_suffix or manage_repo settings), I get a circular symlink error. It seems like /usr/bin/node is symlinked to /etc/alternatives/nodejs which is also symlinked to /usr/bin/node!
What behaviour did you expect instead
Idempotent node.js installation, no matter how many times provision is run.
Output log