Custom Query (894 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (52 - 54 of 894)

Ticket Owner Reporter Resolution Summary
#864 solj https://www.google.com/accounts/o8/id?id=AItOawlo86Mt9tqt2k06humTEpjOdekfWJoTv4M fixed service bcfg2-server status returns incorrect results
Description

Bcfg2 v1.0.1-1 on a RHEL system. running /etc/init.d/bcfg2-server status returns a "is running" method whether bcfg2-server is running or not.

Adding a "ps -ef | grep $PID" to line 77 of the script to examine which process that the status function thinks is "running" shows that its the /etc/init.d script that matches.

[[email protected] ~]# uname -a
Linux rhel 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] ~]# rpm -q bcfg2-server
bcfg2-server-1.0.1-1
[[email protected] ~]# service bcfg2-server status
bcfg2-server (pid 8153) is running...
root      8153  8148  0 10:57 pts/0    00:00:00 /bin/sh /etc/init.d/bcfg2-server status
root      8156  8153  0 10:57 pts/0    00:00:00 ps -ef
root      8157  8153  0 10:57 pts/0    00:00:00 grep 8153

To fix this adding a the "-o %PPID" flag to the pidof call eliminates the parent process from pidof's process list.

[[email protected] ~] diff /etc/init.d/bcfg2-server /etc/init.d/bcfg2-server.orig
74c74
<    PID=$(pidof -x $BINARY -o %PPID)
---
>    PID=$(pidof -x $BINARY)
[[email protected] ~] service bcfg2-server status
bcfg2-server is not running                               [FAILED]

#866 solj https://www.google.com/accounts/o8/id?id=AItOawlo86Mt9tqt2k06humTEpjOdekfWJoTv4M worksforme bcfg2-server SSHbase fails to generate key pairs
Description

When a client connects to the bcfg2 server, the server fails to generate new SSL certificate pairs for a client that does not already have valid certs in the SSHbase directory.

logging from /var/log/messages:

Mar 22 11:02:02 rhel bcfg2-server[19580]: Unexpected failure in BindStructure: ConfigFile /etc/ssh/ssh_host_rsa_key Traceback (most recent call last):   File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Core.py", line 179, in BindStructure     self.Bind(entry, metadata)   File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Core.py", line 212, in Bind     return glist[0].Entries[entry.tag][entry.get('name')](entry, metadata)   File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Plugins/SSHbase.py", line 179, in build_hk     self.GenerateHostKeys(client)   File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Plugins/SSHbase.py", line 215, in GenerateHostKeys     open(fileloc, 'w').write(open(temploc).read()) IOError: [Errno 2] No such file or directory: '/tmp/tmpdfu5E0/ssh_host_dsa_key.H_rhel'
Mar 22 11:02:02 rhel bcfg2-server[19580]: Unexpected failure in BindStructure: ConfigFile /etc/ssh/ssh_host_rsa_key.pub Traceback (most recent call last):   File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Core.py", line 179, in BindStructure     self.Bind(entry, metadata)   File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Core.py", line 212, in Bind     return glist[0].Entries[entry.tag][entry.get('name')](entry, metadata)   File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Plugins/SSHbase.py", line 179, in build_hk     self.GenerateHostKeys(client)   File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Plugins/SSHbase.py", line 215, in GenerateHostKeys     open(fileloc, 'w').write(open(temploc).read()) IOError: [Errno 2] No such file or directory: '/tmp/tmpz6Mnzl/ssh_host_dsa_key.H_rhel'
Mar 22 11:02:02 rhel bcfg2-server[19580]: Generated config for rhel in 0.520s
Mar 22 11:02:03 rhel bcfg2-server[19580]: Client rhel reported state dirty

From what I can tell, there is an os.system call (line #214 of Bcfg2/Server/Plugins/SSHbase.py) that is supposed to fire off ssh-keygen to generate the keys in a temporary directory. It seems that this call isn't generating the keys correctly. Adding in some debug os.listdir(tempdir) calls before and after the os.system call, shows that there are no files before and after the os.system call. Running the command manually generates valid key pairs.

Has anyone else seen this problem?

[[email protected] SSHbase]# uname -a
Linux rhel 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] SSHbase]# rpm -q bcfg2-server
bcfg2-server-1.0.1-1
[[email protected] SSHbase]# rpm -q bcfg2
bcfg2-1.0.1-1
[[email protected] SSHbase]# pwd
/var/lib/bcfg2/SSHbase
[[email protected] SSHbase]# ls -l
total 4
-rw-r----- 1 root root 0 Mar 22 11:02 ssh_host_dsa_key.H_rhel
[[email protected] SSHbase]# which ssh-keygen
/usr/bin/ssh-keygen
directory)
[[email protected] SSHbase]# file /usr/bin/ssh-keygen
/usr/bin/ssh-keygen: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, stripped
[[email protected] SSHbase]# ls -l /tmp/tmpz6Mnzl
/tmp/tmpz6Mnzl:
total 0

[[email protected] SSHbase]# ssh-keygen -q -f /tmp/tmpz6Mnzl/ssh_host_rsa_key.H_rhel -N
"" -t rsa -C [email protected] < /dev/null
[[email protected] SSHbase]# ls -l /tmp/tmpz6Mnzl/
/tmp/tmpz6Mnzl:
total 16
-rw------- 1 root root 1675 Mar 22 11:13 ssh_host_rsa_key.H_rhel
-rw------- 1 root root  391 Mar 22 11:13 ssh_host_rsa_key.H_rhel.pub
#871 solj https://www.google.com/accounts/o8/id?id=AItOawkTXV0x-NJtj3FJIUxtXA1nvkZpg-8kfsU fixed Recursively define permissions
Description

We have a need to recursively set permissions (generally just owner/group and not mode) for everything under a given directory. Doesn't seem possible with the current syntax.

As an example, sometimes the permissions of files under /var/opt/openldap might get borked by an admin. These files are BDB logs whose names follow a pattern, but aren't know beforehand. I'd like to be able to say "/var/opt/openldap/log.* should be ldap:ldap".

-josh

Note: See TracQuery for help on using queries.