« Back to Technical Questions

AXP application hostname configured does not retain

Combination View Flat View Tree View
Hi All,
 
I have installed Linux HA in AXP 1.6 enviornment and is working fine after some amount of customization. But after installation of Linux HA rpms I see a strange issue.
 
Linux HA has some processes that run only if proper local hostname is configured.
 
so inorder to configure the hostname I add the following configuration in gobal AXP config using the cli
 
$> configure terminal
$>hostanme xyz
$>appservice <application name>
$>hostname <xyc.com>
$>ip domain-name <domain.com>
$>exit
$>wr mem
 
if I login to the shell prompt and type uname -n i see the configured hostname but if i restart or reset the blade or vm, the hostname changes back to localhost.localdomain . I checked /etc/hosts file it contains the <ip address><hostname.domain.name. but uname -n always results to localhost.localdomain after restart
 
Following are the list of rpms installed. I think the issue might be from an rpm installed
 
OpenIPMI-libs-2.0.16-7.el5.i386.rpm
PyXML-0.8.4-4.el5_4.2.i386.rpm
cluster-glue-1.0.6-1.6.el5.i386.rpm
cluster-glue-libs-1.0.6-1.6.el5.i386.rpm
corosync-1.2.7-1.1.el5.i386.rpm
corosynclib-1.2.7-1.1.el5.i386.rpm
dmidecode-2.10-3.el5.i386.rpm
epel-release-5-2.noarch.rpm
expat-1.95.8-8.3.el5_5.3.i386.rpm
fipscheck-1.2.0-1.el5.i386.rpm
fipscheck-lib-1.2.0-1.el5.i386.rpm
gdbm-1.8.0-26.2.1.i386.rpm
glibc-common-2.5-49.el5_5.7.i386.rpm
gnutls-1.4.1-3.el5_4.8.i386.rpm
heartbeat-2.1.3-3.el5.centos.i386.rpm
heartbeat-3.0.3-2.3.el5.i386.rpm
heartbeat-libs-3.0.3-2.3.el5.i386.rpm
heartbeat-pils-2.1.3-3.el5.centos.i386.rpm
heartbeat-stonith-2.1.3-3.el5.centos.i386.rpm
iproute-2.6.18-11.el5.i386.rpm
iptables-1.3.5-5.3.el5_4.1.i386.rpm
libgcrypt-1.4.4-5.el5.i386.rpm
libgpg-error-1.4-2.i386.rpm
libibverbs-1.1.3-2.el5.i386.rpm
librdmacm-1.0.10-1.el5.i386.rpm
libsysfs-2.0.0-6.i386.rpm
libtool-ltdl-1.5.22-7.el5_4.i386.rpm
libxml2-2.6.26-2.1.2.8.el5_5.1.i386.rpm
libxslt-1.1.17-2.el5_2.2.i386.rpm
lm_sensors-2.10.7-9.el5.i386.rpm
net-snmp-5.3.2.2-9.el5_5.1.i386.rpm
net-snmp-libs-5.3.2.2-9.el5_5.1.i386.rpm
nspr-4.8.6-1.el5_5.i386.rpm
nss-3.12.8-1.el5.centos.i386.rpm
openhpi-libs-2.14.0-5.el5.i386.rpm
openib-1.4.1-5.el5.noarch.rpm
openssh-4.3p2-41.el5_5.1.i386.rpm
openssh-clients-4.3p2-41.el5_5.1.i386.rpm
openssl-0.9.8e-12.el5_4.6.i686.rpm
pacemaker-1.0.9.1-1.15.el5.i386.rpm
pacemaker-libs-1.0.9.1-1.15.el5.i386.rpm
perl-5.8.8-32.el5_5.2.i386.rpm
perl-TimeDate-1.16-5.el5.noarch.rpm
python-2.4.3-27.el5.i386.rpm
resource-agents-1.0.3-2.6.el5.i386.rpm
tcl-8.4.13-4.el5.i386.rpm
tcp_wrappers-7.6-40.7.el5.i386.rpm
telnet-0.17-39.el5.i386.rpm
tzdata-2010l-1.el5.i386.rpm

 
 
 
 
 

Hi Akshay,



I tested this issue on AXP 1.6.1 by changing the hostname in the guest application configuration portion and then reloaded the service module after saving the change. The correct changed hostname still appears after typing ¿uname ¿n¿ in the Cent OS guest environment. It appears that you may be using the User Defined Linux environment and have installed your own guest OS. I suggest that you run an strace on ¿uname ¿n¿ to determine which libraries may be the cause of your issue. I¿ve included this information from my own strace below.



console-3.2# strace uname -n

execve("/bin/uname", ["uname", "-n"], [/* 6 vars */]) = 0

brk(0) = 0x804e000

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f81000

access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)

open("/lib/tls/i686/sse2/libaudit.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/lib/tls/i686/sse2", 0xbfcb39dc) = -1 ENOENT (No such file or directory)

open("/lib/tls/i686/libaudit.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/lib/tls/i686", 0xbfcb39dc) = -1 ENOENT (No such file or directory)

open("/lib/tls/sse2/libaudit.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/lib/tls/sse2", 0xbfcb39dc) = -1 ENOENT (No such file or directory)

open("/lib/tls/libaudit.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/lib/tls", {st_mode=S_IFDIR|0775, st_size=48, ...}) = 0

open("/lib/i686/sse2/libaudit.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/lib/i686/sse2", 0xbfcb39dc) = -1 ENOENT (No such file or directory)

open("/lib/i686/libaudit.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/lib/i686", 0xbfcb39dc) = -1 ENOENT (No such file or directory)

open("/lib/sse2/libaudit.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)

stat64("/lib/sse2", 0xbfcb39dc) = -1 ENOENT (No such file or directory)

open("/lib/libaudit.so.0", O_RDONLY) = 3

read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\35\0\0004\0\0\0"..., 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=79312, ...}) = 0

mmap2(NULL, 82268, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f6c000

mmap2(0xb7f7f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12) = 0xb7f7f000

close(3) = 0

open("/lib/tls/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/lib/libgcc_s.so.1", O_RDONLY) = 3

read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\26\0\0004\0\0\0"..., 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=44640, ...}) = 0

mmap2(NULL, 47876, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f60000

mmap2(0xb7f6b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa) = 0xb7f6b000

close(3) = 0

open("/lib/tls/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/lib/libc.so.6", O_RDONLY) = 3

read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000_\1\0004\0\0\0"..., 512) = 512

fstat64(3, {st_mode=S_IFREG|0755, st_size=1331612, ...}) = 0

mmap2(NULL, 1336740, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e19000

mmap2(0xb7f5a000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x141) = 0xb7f5a000

mmap2(0xb7f5d000, 9636, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f5d000

close(3) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e18000

set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e186c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0

mprotect(0xb7f5a000, 4096, PROT_READ) = 0

brk(0) = 0x804e000

brk(0x806f000) = 0x806f000

uname({sys="Linux", node="bretthost", ...}) = 0

fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e17000

write(1, "bretthost\n", 10bretthost

) = 10

close(1) = 0

munmap(0xb7e17000, 4096) = 0

exit_group(0) = ?



Thanks,



Brett

Custom Application Engineer

http://developer.cisco.com/web/axp

http://developer.cisco.com/web/srev





From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com]
Sent: Thursday, January 06, 2011 11:43 AM
To: cdicuser@developer.cisco.com
Subject: New Message from Akshay Punja in Application eXtension Platform (AXP) - Technical Questions: AXP application hostname configured does not retain



Akshay Punja has created a new message in the forum "Technical Questions":
--------------------------------------------------------------
Hi All,

I have installed Linux HA in AXP 1.6 enviornment and is working fine after some amount of customization. But after installation of Linux HA rpms I see a strange issue.

Linux HA has some processes that run only if proper local hostname is configured.

so inorder to configure the hostname I add the following configuration in gobal AXP config using the cli

$> configure terminal
$>hostanme xyz
$>appservice <application name>
$>hostname <xyc.com>
$>ip domain-name <domain.com>
$>exit
$>wr mem

if I login to the shell prompt and type uname -n i see the configured hostname but if i restart or reset the blade or vm, the hostname changes back to localhost.localdomain . I checked /etc/hosts file it contains the <ip address><hostname.domain.name. but uname -n always results to localhost.localdomain after restart

Following are the list of rpms installed. I think the issue might be from an rpm installed

OpenIPMI-libs-2.0.16-7.el5.i386.rpm
PyXML-0.8.4-4.el5_4.2.i386.rpm
cluster-glue-1.0.6-1.6.el5.i386.rpm
cluster-glue-libs-1.0.6-1.6.el5.i386.rpm
corosync-1.2.7-1.1.el5.i386.rpm
corosynclib-1.2.7-1.1.el5.i386.rpm
dmidecode-2.10-3.el5.i386.rpm
epel-release-5-2.noarch.rpm
expat-1.95.8-8.3.el5_5.3.i386.rpm
fipscheck-1.2.0-1.el5.i386.rpm
fipscheck-lib-1.2.0-1.el5.i386.rpm
gdbm-1.8.0-26.2.1.i386.rpm
glibc-common-2.5-49.el5_5.7.i386.rpm
gnutls-1.4.1-3.el5_4.8.i386.rpm
heartbeat-2.1.3-3.el5.centos.i386.rpm
heartbeat-3.0.3-2.3.el5.i386.rpm
heartbeat-libs-3.0.3-2.3.el5.i386.rpm
heartbeat-pils-2.1.3-3.el5.centos.i386.rpm
heartbeat-stonith-2.1.3-3.el5.centos.i386.rpm
iproute-2.6.18-11.el5.i386.rpm
iptables-1.3.5-5.3.el5_4.1.i386.rpm
libgcrypt-1.4.4-5.el5.i386.rpm
libgpg-error-1.4-2.i386.rpm
libibverbs-1.1.3-2.el5.i386.rpm
librdmacm-1.0.10-1.el5.i386.rpm
libsysfs-2.0.0-6.i386.rpm
libtool-ltdl-1.5.22-7.el5_4.i386.rpm
libxml2-2.6.26-2.1.2.8.el5_5.1.i386.rpm
libxslt-1.1.17-2.el5_2.2.i386.rpm
lm_sensors-2.10.7-9.el5.i386.rpm
net-snmp-5.3.2.2-9.el5_5.1.i386.rpm
net-snmp-libs-5.3.2.2-9.el5_5.1.i386.rpm
nspr-4.8.6-1.el5_5.i386.rpm
nss-3.12.8-1.el5.centos.i386.rpm
openhpi-libs-2.14.0-5.el5.i386.rpm
openib-1.4.1-5.el5.noarch.rpm
openssh-4.3p2-41.el5_5.1.i386.rpm
openssh-clients-4.3p2-41.el5_5.1.i386.rpm
openssl-0.9.8e-12.el5_4.6.i686.rpm
pacemaker-1.0.9.1-1.15.el5.i386.rpm
pacemaker-libs-1.0.9.1-1.15.el5.i386.rpm
perl-5.8.8-32.el5_5.2.i386.rpm
perl-TimeDate-1.16-5.el5.noarch.rpm
python-2.4.3-27.el5.i386.rpm
resource-agents-1.0.3-2.6.el5.i386.rpm
tcl-8.4.13-4.el5.i386.rpm
tcp_wrappers-7.6-40.7.el5.i386.rpm
telnet-0.17-39.el5.i386.rpm
tzdata-2010l-1.el5.i386.rpm








--
To respond to this post, please click the following link:
<http://developer.cisco.com/web/axp/forums/-/message_boards/message/2879368>
or simply reply to this email.

Hi Brett,
 
I am not using User Defined Linux its CentOS guest OS. Here is the list from strace 'uname -n'
 
bash-3.2# strace uname -n
execve("/bin/uname", ["uname", "-n"], [/* 15 vars */]) = 0
brk(0)                                  = 0x804d000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fbc000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/sse2/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686/sse2", 0xbfefe97c) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/i686", 0xbfefe97c)     = -1 ENOENT (No such file or directory)
open("/lib/tls/sse2/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/tls/sse2", 0xbfefe97c)     = -1 ENOENT (No such file or directory)
open("/lib/tls/libc.so.6", O_RDONLY)    = -1 ENOENT (No such file or directory)
stat64("/lib/tls", {st_mode=S_IFDIR|0775, st_size=48, ...}) = 0
open("/lib/i686/sse2/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/i686/sse2", 0xbfefe97c)    = -1 ENOENT (No such file or directory)
open("/lib/i686/libc.so.6", O_RDONLY)   = -1 ENOENT (No such file or directory)
stat64("/lib/i686", 0xbfefe97c)         = -1 ENOENT (No such file or directory)
open("/lib/sse2/libc.so.6", O_RDONLY)   = -1 ENOENT (No such file or directory)
stat64("/lib/sse2", 0xbfefe97c)         = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000_\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1331612, ...}) = 0
mmap2(NULL, 1336740, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e75000
mmap2(0xb7fb6000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x141) = 0xb7fb6000
mmap2(0xb7fb9000, 9636, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fb9000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e74000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e746c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7fb6000, 4096, PROT_READ)   = 0
brk(0)                                  = 0x804d000
brk(0x806e000)                          = 0x806e000
uname({sys="Linux", node="localhost.localdomain", ...}) = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e73000
write(1, "localhost.localdomain\n", 22localhost.localdomain
) = 22
close(1)                                = 0
munmap(0xb7e73000, 4096)                = 0
exit_group(0)                           = ?

Hi Akshay,
 
The strace data is pretty similar with both showing that libc.so.6 is accessed.  I thought you may be using UDL because the rpms you are installing are not applicable to our 5.2 Guest Cent OS environment.  For example in Cent OS 5.2 the glibc-common rpm is glibc-common-2.5-24.i386.rpm while you are installing glibc-common-2.5-49.el5_5.7.i386.rpm .  Here's a link to the Cent OS rpms - http://vault.centos.org/5.2/os/i386/CentOS/ .  I'm assuming that without the additional rpms you've installed that uname -n works as desired which did so under my lab tests.  The uname binary is part of the coreutils rpm which you're not installing so I don't think you've changed that file?
 
If you just need to get this working, here's a workaround you can try.  In the guest OS create the file /etc/sysconfig/network and add the line HOSTNAME=<your value> .  Then reset the virtual machine.  When you re-enter the guest OS and type uname -n you should now see the value from the network file.
 
Thanks,
 
Brett