r10k puppetfile install hang / stuck - puppet

So i'm trying to install a lot of module (66 in total) from a single Puppetfile and after every 7-9 modules installed the process hang up or it seem that it's stops working.
I found a temporal solution tot this problem, but it's a bit of a pain.
I have to kill the r10k process and remove the module that it was trying to install from the ~/.r10k/git folder
user#ubuntu:~$ ps -aux | grep r10k
user 20294 0.1 0.1 234032 30728 pts/1 Sl+ 13:03 0:00 /usr/bin/ruby2.5 /home/user/.ruby/bin/r10k puppetfile install -v
user 27143 0.0 0.0 26028 4004 ? Ss 13:15 0:00 git clone ssh://git#bitbucket.com:/bla/crashed-repository.git /home/user/Documents/Projects/repository --reference /home/ser/.r10k/git/ssh---git#bitbucket.com-7999-crashed-repository.git
user#ubuntu:~$ kill 20294
user#ubuntu:~$ kill 27143
user#ubuntu:~$ cd ~/.r10k/git/
user#ubuntu:~/.../git$ ls -la
total 8
drwxr-xr-x 37 user user 4096 ago 23 13:18 .
drwxr-xr-x 3 user user 4096 ago 23 12:46 ..
drwxr-xr-x 7 user user 4096 ago 23 12:46 ssh---git#bitbucket.com-7999-respository_one.git
drwxr-xr-x 7 user user 4096 ago 23 12:46 ssh---git#bitbucket.com-7999-respository_two.git
drwxr-xr-x 7 user user 4096 ago 23 12:46 ssh---git#bitbucket.com-7999-respository_three.git
drwxr-xr-x 7 user user 4096 ago 23 12:46 ssh---git#bitbucket.com-7999-respository_four.git
.
.
.
drwxr-xr-x 7 user user 4096 ago 23 12:46 ssh---git#bitbucket.com-7999-crashed-repository.git
user#ubuntu:~/.../git$ rm -r ssh---git#bitbucket.com-7999-crashed-repository.git
And after that run it again until it hang up again, and so on until all the modules are installed.
I've found a thread on the puppetlabs/r10k github that explains why this happens, but no solution to the problem.
If anyone know how to do a "try/catch" while installing multiple puppet modules so that this issue doesn't show up anymore i'll be very grateful.

Related

Permission denied in "make qemu" in wtakuo/xv6-env docker image

I have an image from https://hub.docker.com/r/wtakuo/xv6-env. I pull it with docker pull wtakuo/xv6-env and run it with:
$ docker run -it --rm -v $(pwd):/home/xv6/xv6-riscv wtakuo/xv6-env
After container created and run image on its, I run make qemu but I get this error:
mkfs/mkfs fs.img README user/_cat user/_echo user/_forktest user/_grep user/_init user/_kill user/_ln user/_ls user/_mkdir user/_rm user/_sh user/_stressfs user/_usertests user/_grind user/_wc user/_zombie
fs.img: Permission denied
make: *** [Makefile:137: fs.img] Error 1
I don't know what should be do to fix it.
this is my directory content (with ll command):
drwxrwxr-x 8 root root 4096 Nov 1 16:30 .git/
-rw-rw-r-- 1 xv6 xv6 1174 Nov 1 16:27 LICENSE
-rw-rw-r-- 1 xv6 xv6 4709 Nov 1 16:27 Makefile
-rw-rw-r-- 1 root root 2305 Nov 1 16:24 README
-rw-rw-r-- 1 xv6 xv6 17 Nov 1 16:30 README.md
drwxrwxr-x 2 xv6 xv6 4096 Nov 4 17:57 kernel/
drwxrwxr-x 2 xv6 xv6 4096 Nov 4 17:57 mkfs/
drwxrwxr-x 2 xv6 xv6 4096 Nov 4 17:57 user/
I googled for this but not found effectively answer.
I tried
sudo chown -R user1:user1 *
but show this error: fs.img: Permission denied
For this problem, we must use from sudo command.
our user is xv6 and the password is also the same.
after use from it, we see this output:
xv6 kernel is booting
hart 1 starting
hart 2 starting
init: starting sh

Folder Permissions not Sticking

I'd like to think I'm not a linux noob but I am having an issue I can't explain. I hope it something stupid. I have an external drive that I am trying to set up on plex. It was originally formatted ntfs but I shrunk the partition and made another ext4 partition. Plex can't look into the drive and see the folders. I have been trying to change the perms but they aren't sticking. They don't stick if
myUser#mint /media/myUser $ ls -lah
total 44K
drwxr-x---+ 6 root root 4.0K Oct 24 11:21 .
drwxr-xr-x 3 root root 4.0K Oct 24 10:50 ..
drwx------ 1 myUser myUser 20K Oct 14 07:27 DataDisk
myUser#myUserMint /media/myUser $ sudo chmod -R 766 DataDisk/
[sudo] password for myUser:
myUser#mint /media/myUser $ ls -lah
total 44K
drwxr-x---+ 6 root root 4.0K Oct 24 11:21 .
drwxr-xr-x 3 root root 4.0K Oct 24 10:50 ..
drwx------ 1 myUser myUser 20K Oct 14 07:27 DataDisk
myUser#mint /media/myUser $
Am I missing something obvious or is this just weird?

Just a little confused on linux ownership

I'm using Ubuntu 14.04 server and I just finished up configuring my forums, however I'm trying to install a new theme with for this software and think i have just about got it.
/var/www/html/styles# ls -al
total 16
drwxr-xr-x 4 www-data www-data 4096 Jul 6 14:06 .
drwxr-xr-x 18 www-data www-data 4096 Jul 6 12:50 ..
drwxr-xr-x 6 www-data root 4096 Jul 6 14:07 SE_Gamer_Dark
drwxr-xr-x 4 www-data www-data 4096 Jul 6 11:28 prosilver`
Question: drwxr-xr-x 6 www-data root 4096 Jul 6 14:07 SE_Gamer_Dark
how do i change root in the above line? i thought this was file-permissions and needed a chown which i did : chown www-data SE_Gamer_Dark. This only however change the initial
drwxr-xr-x 6 root root 4096 Jul 6 14:07 SE_Gamer_Dark to the one you see,
drwxr-xr-x 6 www-data root 4096 Jul 6 14:07 SE_Gamer_Dark
As far as i know, the user "root" has the right to read and write this file, but i need www-data to be able to? I tried chmod aswell, but it didn't change the root
try:
chgrp www-data SE_Gamer_Dark
Second parameter is group
You can change group only:
chgrp www-data SE_Gamer_DARK
Or group and user at the same time:
chown www-data root.SE_Gamer_DARK
In the example above root is the user and SE_Gamer_DARK is a group
You can also do it for entire subtree:
chown -R www-data root.SE_Gamer_DARK

Can't CD to directory inside of root

I am currently creating an application that requires separate users running duplicate programs. They cannot run under root because of security reasons, so they are initiated by a Java app that I am working on, and I am starting them with runuser -l. However, I cannot cd into a directory, even though it is owned by the user, and the user has 770 permissions in the folder.
Here's what I'm running:
runuser -l lp1 -c 'java \-jar /root/Desktop/workspace/LitePanel/servers/server1/server.jar \-Xms1024M nogui'
And the output of this is:
runuser: warning: cannot change directory to /root/Desktop/workspace/LitePanel/bin/servers/server1/: Permission denied
Here's an ls -all:
drwxr-xr-x. 3 root root 4096 Jan 30 14:03 .
drwxr-xr-x. 7 root root 4096 Jan 30 14:02 ..
drwxrwx---. 2 lp1 lp1 4096 Jan 31 03:07 server1
Inside the directory:
drwxrwx---. 2 lp1 lp1 4096 Jan 31 03:07 .
drwxr-xr-x. 3 root root 4096 Jan 30 14:03 ..
-rwxrwx---. 1 lp1 lp1 9170551 Jan 31 03:07 server.jar
And here's /etc/passwd:
lp1:x:501:501::/root/Desktop/workspace/LitePanel/bin/servers/server1/:/bin/false
Anyone know why this is happening? It looks like the user has the necessary permissions to do this.
You have said that the directory itself has permissions 770 and is owned by the user, but what about its parents? I believe the cd command will need at least read access (and possibly execute) on the parent directories.

Can't run npm-installed packages as user

Earlier this afternoon I installed Node.js on Fedora 16.
user#$ sudo yum localinstall --nogpgcheck http://nodejs.tchol.org/repocfg/fedora/nodejs-stable-release.noarch.rpm
user#$ sudo yum install nodejs-compat-symlinks npm
Then I installed a package with npm. Every package I've installed with npm on Fedora (this isn't my first time) has involved something like the following process. Read it and weep. Clearly, this is hackish and wrong, but when I decide to install less or any other npm package, I have to go through the same procedure. Why? What is broken about my environment or approach?
user#$ sudo npm install -g jslint
[... this works ... kind of]
user#$ jslint
bash: jslint: command not found
user#$ sudo su
root#$ jslint
No files specified.
Usage: /bin/jslint ... [works]
root#$ which jslint
/bin/jslint
root#$ ls -l jslint
lrwxrwxrwx. 1 root root 38 Jul 15 14:58 /bin/jslint -> /lib/node_modules/jslint/bin/jslint.js
root#$ cd /lib/node_modules; ls -l
...
drwxr-xr-x. 2 root root 4096 Jul 15 14:22 inherits
drwxr-xr-x. 2 root root 4096 Jul 15 14:22 ini
drwx------. 6 nobody usergroup 4096 Jul 15 14:58 jshint
drwxr-xr-x. 3 root root 4096 Jul 15 14:22 lru-cache
...
root#$ find . -type d -print0 | xargs -0 chmod 755
root#$ ls -l
...
drwxr-xr-x. 2 root root 4096 Jul 15 14:22 inherits
drwxr-xr-x. 2 root root 4096 Jul 15 14:22 ini
drwxr-xr-x. 5 nobody usergroup 4096 Jul 15 15:32 jslint
drwxr-xr-x. 3 root root 4096 Jul 15 14:22 lru-cache
...
root#$ su user
user#$ jslint
o files specified.
Usage: /bin/jslint [now it finally works]
Recent versions of npm switch to user "nobody" as a security measure if it's being run with sudo privileges. Try doing global installs while logged in as root, rather than using sudo.

Resources