[Spacewalk-devel] ubuntu dependancy python-hwdata and support for 3.x kernels for memory information

2012-07-03 Thread william

Hi,

i saw in my logfile that it could not connect to hald.

After a tip from msuchy i looked at gudev which should be used when it 
is installed.


after investigation i saw it could not import hwdata
so i manually installed python-hwdata and it started to work.

python-hwdata should be a dependancy for rhn (maybe it should be 
packaged, not sure)




Also my current kernel is version 3.2 (ubuntu 12.04) but the hardware.py 
file only checks for uname 2.4 and uname 2.6


so i added

if kernel[:3] == 3:
return read_memory_2_6()

to hardware.py

def read_memory():
un = os.uname()
kernel = un[2]
if kernel[:3] == 3:
return read_memory_2_6()
if kernel[:3] == 2.6:
return read_memory_2_6()
if kernel[:3] == 2.4:
return read_memory_2_4()

and now the memory information gets collected and pushed to spacewalk.

Regards,

Willem

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] ubuntu dependancy python-hwdata and support for 3.x kernels for memory information

2012-07-03 Thread Miroslav Suchý

On 07/03/2012 10:29 PM, william wrote:


after investigation i saw it could not import hwdata
so i manually installed python-hwdata and it started to work.

python-hwdata should be a dependancy for rhn (maybe it should be
packaged, not sure)


Good point, will try to fix that in next release.


Also my current kernel is version 3.2 (ubuntu 12.04) but the hardware.py
file only checks for uname 2.4 and uname 2.6

so i added

 if kernel[:3] == 3:
 return read_memory_2_6()

to hardware.py

def read_memory():
 un = os.uname()
 kernel = un[2]
 if kernel[:3] == 3:
 return read_memory_2_6()
 if kernel[:3] == 2.6:
 return read_memory_2_6()
 if kernel[:3] == 2.4:
 return read_memory_2_4()

and now the memory information gets collected and pushed to spacewalk.


Indeed.
Commited as 4e48c16.

Thanks for investigation.

--
Miroslav Suchy
Red Hat Satellite Engineering


___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel