SlideShare uma empresa Scribd logo
1 de 6
Baixar para ler offline
'Snapdrive storage wizard create' fails/times out on HP-UX systems when
the nodename does not equal the hostname.
What is SnapDrive for UNIX?
SnapDrive for UNIX is a tool that helps you in automating storage provisioning
operations, it enables you to manage Snapshot™ copies easily and simplifies data
backup, so that you can recover the data if it is accidentally deleted or modified. With
the integration of SnapCreator framework you can even manage database
applications, do cloning and many more stuff etc. For more info, please refer to
NetApp documentation.
Issue:
‘Snapdrive storage wizard create’ command on HP-UX fails/times out while trying to
get the configured NetApp storage systems.
Little story behind this issue:
This issue occurred roughly about 1 year & 6 months back while working at one of
my client side. It took 2 months of struggle & frustration before the enlightenment
happened. As I mentioned, it was a struggle b'cos there was absolutely no indication
of what was broke in the 'snapdrive storage wizard' API.
During this frustrating period of troubleshooting, I turned to NetApp support, but due
to it's unique nature and not being a wider impact there wasn't much help available,
NetApp said they will have to test it and it can take some time, they hinted, we might
be hitting a bug. Basically, I was told to advise a workaround, which meant manually
provisioning & management of LUN.
As so much time had already passed and shear frustration & pressure was building up,
I decided to continue working on it for few more days before giving up, thankfully, it
all got sorted in time.
Background about the issue:
HP-UX and Solaris systems have 'nodename' & 'hostname' concept, which is different
from redhat *nix which I am use to for number of years.
Error on the front end: [Following screenshot is the simulation of the error on
Redhat box]
As you can see the 'wizard just sits there and eventually times out', not much helpful.
Error on the SD trace log:
It was the generic nature of the error that caused so much frustration, as you can see
the error [could not get IP address] traced in the sd-trace log:
As the error indicated ‘could not get IP address’, we checked the host resolution in
/etc/hosts file and also nameserver and it worked fine. We could telnet/ping and it
resolved as expected. Hence, we were clueless as what else could go wrong.
Note: Out of 5 HP-UX servers, which had snapdrive, installed, only one complained
during 'snapdrive storage wizard create...' operation.
The server, which complained, turns out had different nodename compared to
hostname. For example purpose only –
HP-UX>uname -a
server
HP-UX>hostname
server01
As you can see nodename is different from the hostname.
Cause:
As the Nodename on the HP-UNIX host was different from the Hostname, and
‘getaddrinfo () call’ that ‘snapdrive storage wizard’ makes to obtain the IP address of
the host fails/times out b'cos the nodename is not captured either in the nameserver or
in the flat file /etc/hosts. As a result, it fails to obtain the IP address. Let's try to
understand what 'getaddrinfo ()' does.
What is getaddrinfo?
The getaddrinfo [RFC 2553 function] provides protocol-independent translation from
an ANSI host name to an address.
[The RFC 2553 functions getaddrinfo and getnameinfo provide an abstracted way to
convert between a pair of host name/service name and socket addresses, or vice versa.
getaddrinfo converts names into a set of arguments to pass to the socket() and
connect() syscalls, and getnameinfo converts a socket address back into its host
name/service name pair.]
How it works: getaddrinfo() library routines internally call the name service switch to
access the ipnodes database lookup policy configured in the /etc/nsswitch.conf ? file.
 Domain Name Server Operation:[Bind/DNS]
If the local system is configured to use the BIND/DNS name server, for name/address
resolution, getaddrinfo( ) retrieves the host information from the name server. If the
'nameserver' is not available or if the hostname is not available in the database, it then
moves to flat-file /etc/hosts.
 Nonserver Operation:[/etc/hosts]
During a name/address resolution, if the database is configured for flat-file resolution,
getaddrinfo( ) use the /etc/hosts for resolution. getaddrinfo ( ) Sequentially searches
the /etc/hosts file until a host name (official name or an alias name) matching the
name parameter is found or until the end of file is encountered. The host names are
matched irrespective of upper or lower case alphabets.
Reason for failure:
Nodename which was different from the hostname, was nowhere listed, neither in
DNS or /etc/hosts file. Hence, getaddrinfo () could not get the IP address.
Resolution:
If for some reason you have to have a hostname that differs from the nodename, you
can add a line to '/etc/rc.config.d/netconf' like:
HOSTNAME=longnetworkname
NODENAME=shortname
Then declare both names in the /etc/hosts file, so that both values resolve to the host's
IP address.
Simply: You can just add the nodename & IP entry into the /etc/hosts file. That’s it!
On HP-UNIX systems:
Normally, when a system boots the /sbin/init.d/hostname script runs the uname -S
command to set the uname value to be equal to the root of the HOSTNAME variable
(everything before the first ".", in case a domainname is specified) defined in
/etc/rc.config.d netconf. In most cases, nodename & hostnames are same and hence
hostname/nodename to IP translation works well. But, there are situations when you
have no choice but to have hostname different from nodename due to 8 characters
restriction on nodename naming length.
How to replicate this issue:
You can test this scenario on any *nix system [I believe], it's not really necessary to
have to have HP-UX system. I am going to test this on redhat EL 5.
Steps:
1. Make sure everything is working, as it should be. In this test, my hostname is
‘redhat’ and it resolves to IP address without any issues.
2. Run the wizard, it should work fine.
3. Now, let’s break it. Let’s alter the hostname from redhat to redhat_01. Basically, by
changing the hostname, we are trying to simulate a scenario where nodename &
hostname are not same.
4. Run the wizard again, this time it should fail as expected.
5. You can also trace the error on the snapdrive trace log [sd-trace.log].
6. Let’s fix this issue by simply adding the modified hostname [redhat_01] entry
into the /etc/hosts file.
7. Run the wizard, we should be back in business now.
Observation
How could we have avoided this issue?
Well, I am not developer so I really don’t know how we could provide more
informative error reporting around getaddrinfo ( ) calls that snadprive makes.
I am guessing snapdrive is using standard POSIX API getaddrinfo () call to do the
nodename translation, so I guess it has to report errors as per getaddrinfo() API. Could
SnapDrive for UNIX developers have inserted some extra logic to report more
informative error? I leave this to NetApp.
This issue has been turned into a KB; you can access the KB through this link:
https://kb.netapp.com/support/index?page=content&id=2017582
Oct, 2014
ashwinwriter@gmail.com

Mais conteúdo relacionado

Mais de Ashwin Pawar

Network port administrative speed does not display correctly on NetApp storage
Network port administrative speed does not display correctly on NetApp storageNetwork port administrative speed does not display correctly on NetApp storage
Network port administrative speed does not display correctly on NetApp storageAshwin Pawar
 
How to connect to NetApp FILER micro-USB console port
How to connect to NetApp FILER micro-USB console portHow to connect to NetApp FILER micro-USB console port
How to connect to NetApp FILER micro-USB console portAshwin Pawar
 
NDMP backup models
NDMP backup modelsNDMP backup models
NDMP backup modelsAshwin Pawar
 
How to use Active IQ tool to access filer information
How to use Active IQ tool to access filer informationHow to use Active IQ tool to access filer information
How to use Active IQ tool to access filer informationAshwin Pawar
 
San vs Nas fun series
San vs Nas fun seriesSan vs Nas fun series
San vs Nas fun seriesAshwin Pawar
 
Steps to identify ONTAP latency related issues
Steps to identify ONTAP latency related issuesSteps to identify ONTAP latency related issues
Steps to identify ONTAP latency related issuesAshwin Pawar
 
SnapDiff process flow chart
SnapDiff process flow chartSnapDiff process flow chart
SnapDiff process flow chartAshwin Pawar
 
SnapDiff performance issue
SnapDiff performance issueSnapDiff performance issue
SnapDiff performance issueAshwin Pawar
 
Volume level restore fails with error transient snapshot copy is not supported
Volume level restore fails with error transient snapshot copy is not supportedVolume level restore fails with error transient snapshot copy is not supported
Volume level restore fails with error transient snapshot copy is not supportedAshwin Pawar
 
Disk reports predicted failure event
Disk reports predicted failure eventDisk reports predicted failure event
Disk reports predicted failure eventAshwin Pawar
 
OCUM shows ONTAP cluster health degraded
OCUM shows ONTAP cluster health degradedOCUM shows ONTAP cluster health degraded
OCUM shows ONTAP cluster health degradedAshwin Pawar
 
NDMPCOPY lun from 7-mode NetApp to cDOT
NDMPCOPY lun from 7-mode NetApp to cDOTNDMPCOPY lun from 7-mode NetApp to cDOT
NDMPCOPY lun from 7-mode NetApp to cDOTAshwin Pawar
 
Latency in storage
Latency in storageLatency in storage
Latency in storageAshwin Pawar
 
NetApp storage layering
NetApp storage layeringNetApp storage layering
NetApp storage layeringAshwin Pawar
 
What is storage from client's perspective
What is storage from client's perspectiveWhat is storage from client's perspective
What is storage from client's perspectiveAshwin Pawar
 
Difference between cluster image package show-repository and system image get
Difference between cluster image package show-repository and system image getDifference between cluster image package show-repository and system image get
Difference between cluster image package show-repository and system image getAshwin Pawar
 
Cannot access NetApp 7-mode admin shares etc$
Cannot access NetApp 7-mode admin shares etc$Cannot access NetApp 7-mode admin shares etc$
Cannot access NetApp 7-mode admin shares etc$Ashwin Pawar
 

Mais de Ashwin Pawar (20)

Network port administrative speed does not display correctly on NetApp storage
Network port administrative speed does not display correctly on NetApp storageNetwork port administrative speed does not display correctly on NetApp storage
Network port administrative speed does not display correctly on NetApp storage
 
How to connect to NetApp FILER micro-USB console port
How to connect to NetApp FILER micro-USB console portHow to connect to NetApp FILER micro-USB console port
How to connect to NetApp FILER micro-USB console port
 
NDMP backup models
NDMP backup modelsNDMP backup models
NDMP backup models
 
How to use Active IQ tool to access filer information
How to use Active IQ tool to access filer informationHow to use Active IQ tool to access filer information
How to use Active IQ tool to access filer information
 
San vs Nas fun series
San vs Nas fun seriesSan vs Nas fun series
San vs Nas fun series
 
Steps to identify ONTAP latency related issues
Steps to identify ONTAP latency related issuesSteps to identify ONTAP latency related issues
Steps to identify ONTAP latency related issues
 
SnapDiff
SnapDiffSnapDiff
SnapDiff
 
SnapDiff process flow chart
SnapDiff process flow chartSnapDiff process flow chart
SnapDiff process flow chart
 
SnapDiff performance issue
SnapDiff performance issueSnapDiff performance issue
SnapDiff performance issue
 
Volume level restore fails with error transient snapshot copy is not supported
Volume level restore fails with error transient snapshot copy is not supportedVolume level restore fails with error transient snapshot copy is not supported
Volume level restore fails with error transient snapshot copy is not supported
 
Disk reports predicted failure event
Disk reports predicted failure eventDisk reports predicted failure event
Disk reports predicted failure event
 
OCUM shows ONTAP cluster health degraded
OCUM shows ONTAP cluster health degradedOCUM shows ONTAP cluster health degraded
OCUM shows ONTAP cluster health degraded
 
NDMPCOPY lun from 7-mode NetApp to cDOT
NDMPCOPY lun from 7-mode NetApp to cDOTNDMPCOPY lun from 7-mode NetApp to cDOT
NDMPCOPY lun from 7-mode NetApp to cDOT
 
Latency in storage
Latency in storageLatency in storage
Latency in storage
 
NVRAM vs NVMEM
NVRAM vs NVMEMNVRAM vs NVMEM
NVRAM vs NVMEM
 
NAS vs SAN
NAS vs SANNAS vs SAN
NAS vs SAN
 
NetApp storage layering
NetApp storage layeringNetApp storage layering
NetApp storage layering
 
What is storage from client's perspective
What is storage from client's perspectiveWhat is storage from client's perspective
What is storage from client's perspective
 
Difference between cluster image package show-repository and system image get
Difference between cluster image package show-repository and system image getDifference between cluster image package show-repository and system image get
Difference between cluster image package show-repository and system image get
 
Cannot access NetApp 7-mode admin shares etc$
Cannot access NetApp 7-mode admin shares etc$Cannot access NetApp 7-mode admin shares etc$
Cannot access NetApp 7-mode admin shares etc$
 

Último

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Último (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Snapdrive for UNIX storage wizard create times out

  • 1. 'Snapdrive storage wizard create' fails/times out on HP-UX systems when the nodename does not equal the hostname. What is SnapDrive for UNIX? SnapDrive for UNIX is a tool that helps you in automating storage provisioning operations, it enables you to manage Snapshot™ copies easily and simplifies data backup, so that you can recover the data if it is accidentally deleted or modified. With the integration of SnapCreator framework you can even manage database applications, do cloning and many more stuff etc. For more info, please refer to NetApp documentation. Issue: ‘Snapdrive storage wizard create’ command on HP-UX fails/times out while trying to get the configured NetApp storage systems. Little story behind this issue: This issue occurred roughly about 1 year & 6 months back while working at one of my client side. It took 2 months of struggle & frustration before the enlightenment happened. As I mentioned, it was a struggle b'cos there was absolutely no indication of what was broke in the 'snapdrive storage wizard' API. During this frustrating period of troubleshooting, I turned to NetApp support, but due to it's unique nature and not being a wider impact there wasn't much help available, NetApp said they will have to test it and it can take some time, they hinted, we might be hitting a bug. Basically, I was told to advise a workaround, which meant manually provisioning & management of LUN. As so much time had already passed and shear frustration & pressure was building up, I decided to continue working on it for few more days before giving up, thankfully, it all got sorted in time. Background about the issue: HP-UX and Solaris systems have 'nodename' & 'hostname' concept, which is different from redhat *nix which I am use to for number of years.
  • 2. Error on the front end: [Following screenshot is the simulation of the error on Redhat box] As you can see the 'wizard just sits there and eventually times out', not much helpful. Error on the SD trace log: It was the generic nature of the error that caused so much frustration, as you can see the error [could not get IP address] traced in the sd-trace log: As the error indicated ‘could not get IP address’, we checked the host resolution in /etc/hosts file and also nameserver and it worked fine. We could telnet/ping and it resolved as expected. Hence, we were clueless as what else could go wrong. Note: Out of 5 HP-UX servers, which had snapdrive, installed, only one complained during 'snapdrive storage wizard create...' operation. The server, which complained, turns out had different nodename compared to hostname. For example purpose only – HP-UX>uname -a server HP-UX>hostname server01 As you can see nodename is different from the hostname.
  • 3. Cause: As the Nodename on the HP-UNIX host was different from the Hostname, and ‘getaddrinfo () call’ that ‘snapdrive storage wizard’ makes to obtain the IP address of the host fails/times out b'cos the nodename is not captured either in the nameserver or in the flat file /etc/hosts. As a result, it fails to obtain the IP address. Let's try to understand what 'getaddrinfo ()' does. What is getaddrinfo? The getaddrinfo [RFC 2553 function] provides protocol-independent translation from an ANSI host name to an address. [The RFC 2553 functions getaddrinfo and getnameinfo provide an abstracted way to convert between a pair of host name/service name and socket addresses, or vice versa. getaddrinfo converts names into a set of arguments to pass to the socket() and connect() syscalls, and getnameinfo converts a socket address back into its host name/service name pair.] How it works: getaddrinfo() library routines internally call the name service switch to access the ipnodes database lookup policy configured in the /etc/nsswitch.conf ? file.  Domain Name Server Operation:[Bind/DNS] If the local system is configured to use the BIND/DNS name server, for name/address resolution, getaddrinfo( ) retrieves the host information from the name server. If the 'nameserver' is not available or if the hostname is not available in the database, it then moves to flat-file /etc/hosts.  Nonserver Operation:[/etc/hosts] During a name/address resolution, if the database is configured for flat-file resolution, getaddrinfo( ) use the /etc/hosts for resolution. getaddrinfo ( ) Sequentially searches the /etc/hosts file until a host name (official name or an alias name) matching the name parameter is found or until the end of file is encountered. The host names are matched irrespective of upper or lower case alphabets. Reason for failure: Nodename which was different from the hostname, was nowhere listed, neither in DNS or /etc/hosts file. Hence, getaddrinfo () could not get the IP address. Resolution: If for some reason you have to have a hostname that differs from the nodename, you can add a line to '/etc/rc.config.d/netconf' like: HOSTNAME=longnetworkname NODENAME=shortname Then declare both names in the /etc/hosts file, so that both values resolve to the host's IP address. Simply: You can just add the nodename & IP entry into the /etc/hosts file. That’s it!
  • 4. On HP-UNIX systems: Normally, when a system boots the /sbin/init.d/hostname script runs the uname -S command to set the uname value to be equal to the root of the HOSTNAME variable (everything before the first ".", in case a domainname is specified) defined in /etc/rc.config.d netconf. In most cases, nodename & hostnames are same and hence hostname/nodename to IP translation works well. But, there are situations when you have no choice but to have hostname different from nodename due to 8 characters restriction on nodename naming length. How to replicate this issue: You can test this scenario on any *nix system [I believe], it's not really necessary to have to have HP-UX system. I am going to test this on redhat EL 5. Steps: 1. Make sure everything is working, as it should be. In this test, my hostname is ‘redhat’ and it resolves to IP address without any issues. 2. Run the wizard, it should work fine.
  • 5. 3. Now, let’s break it. Let’s alter the hostname from redhat to redhat_01. Basically, by changing the hostname, we are trying to simulate a scenario where nodename & hostname are not same. 4. Run the wizard again, this time it should fail as expected. 5. You can also trace the error on the snapdrive trace log [sd-trace.log]. 6. Let’s fix this issue by simply adding the modified hostname [redhat_01] entry into the /etc/hosts file.
  • 6. 7. Run the wizard, we should be back in business now. Observation How could we have avoided this issue? Well, I am not developer so I really don’t know how we could provide more informative error reporting around getaddrinfo ( ) calls that snadprive makes. I am guessing snapdrive is using standard POSIX API getaddrinfo () call to do the nodename translation, so I guess it has to report errors as per getaddrinfo() API. Could SnapDrive for UNIX developers have inserted some extra logic to report more informative error? I leave this to NetApp. This issue has been turned into a KB; you can access the KB through this link: https://kb.netapp.com/support/index?page=content&id=2017582 Oct, 2014 ashwinwriter@gmail.com