<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body>
    
<div>Holy cow!  What a great write up!  Lot to digest here.  Very much appreciated!</div><div><br></div><div><br></div><div><br></div><div id="composer_signature"><div style="font-size:88%;color:#364f67" dir="auto">Happy Connecting. Sent from my Sprint Samsung Galaxy S® 5 Sport</div></div><br><br>-------- Original message --------<br>From: "William H. ten Bensel" <WHTENBEN@up.com> <br>Date: 2/17/17  3:34 PM  (GMT-07:00) <br>To: spacewalk-list@redhat.com <br>Subject: Re: [Spacewalk-list] Building Spacewalk With a DNS Alias for Failover <br><br><font size="2" face="sans-serif">Not crazy at ALL, that is what I do+.  
Hopefully this brain dump will help. </font><br><br><font size="2" face="sans-serif">GOTCHA's ..... If you are using ISS
to sync other Spacewalks... You have to put BOTH </font><tt><font size="2">failoverhost.network.com</font></tt><font size="2" face="sans-serif">and </font><tt><font size="2">primaryhost.network.com</font></tt><font size="2" face="sans-serif">in the list!  Spacewalk does not associate </font><tt><font size="2">ALIAS
to connecting server.  It only allows one name for connecting server
and does not do a DNS look up to see if the ALIAS listed matches the connecting
server.</font></tt><br><br><font size="2" face="sans-serif">Background...  I have an SLA of
99.9+.  So, up time and recovery are critical.  I support multiple
spacewalks and use this logic even on the Spacewalk's respective proxies.
 The link  from 2016 is outdated (</font><a href="https://www.redhat.com/archives/spacewalk-list/2016-May/msg00129.html"><font size="2" color="blue" face="sans-serif">https://www.redhat.com/archives/spacewalk-list/2016-May/msg00129.html</font></a><font size="2" face="sans-serif">)
so here is some updated information.</font><br><font size="2" face="sans-serif"><br>NOTE:  Both Primary and failover have the SAME version of Spacewalk.
 That is a requirement.  If you upgrade one, you must upgrade
the other.   </font><br><br><font size="2" face="sans-serif">First things First... Before installing
the Spacewalk, I create the logical volumes/filesystems that I know have
to be sync'd or replaced..  If you put these on SAN, NFS, Gluster,
RedHat Storage, DFS, etc.. or need to instruct someone how to restore..
It is easy to say.. Look at the filesystems.. restore to there or unmount
and remount.   No point of restoring the entire server or reinstalling
the application, if you have a hot standby already.</font><br><br><font size="2" face="sans-serif">Updated paths and sizing.</font><br><font size="2" face="sans-serif">These paths get replaced or restored
on the Failover server.</font><br><font size="2" face="sans-serif"><br>  "mount_path": "/etc/cobbler",   "size":
"1"</font><br><font size="2" face="sans-serif">  "mount_path": "/var/lib/cobbler",
 "size": "1"</font><br><font size="2" face="sans-serif">  "mount_path": "/var/log/cobbler",
 "size": "1"</font><br><font size="2" face="sans-serif">  "mount_path": "/var/log/httpd",
 "size": "6"</font><br><font size="2" face="sans-serif">  "mount_path": "/var/lib/jabberd/db",
 "size": "1"  --> PREVENT jabberdb CORRUPTION
and osad system re-registration</font><br><font size="2" face="sans-serif">  "mount_path": "/etc/jabberd",
 "size": "1"</font><br><font size="2" face="sans-serif">  "mount_path": "/var/cache/rhn",
 "size": "50"</font><br><font size="2" face="sans-serif">  "mount_path": "/etc/rhn",
 "size": "1"</font><br><font size="2" face="sans-serif">  "mount_path": "/etc/httpd",
 "size": "1"</font><br><font size="2" face="sans-serif">  "mount_path": "/var/lib/rhn",
 "size": "1"</font><br><font size="2" face="sans-serif">  "mount_path": "/var/log/rhn",
 "size": "3"</font><br><font size="2" face="sans-serif">  "mount_path": "/var/log/tomcat6",
 "size": "1"</font><br><font size="2" face="sans-serif">  "mount_path": "/var/www",
 "size": "1"</font><br><font size="2" face="sans-serif">  "mount_path": "/usr/share/spacewalk",
 "size": "1"</font><br><font size="2" face="sans-serif">  "mount_path": "/etc/pki/spacewalk",
 "size": "1"</font><br><font size="2" face="sans-serif">  "mount_path": "/var/cache/rhn",
 "size": "40"</font><br><font size="2" face="sans-serif">  "mount_path": "/var/www",
 "size": "5"</font><br><font size="2" face="sans-serif">  "mount_path": "/var/satellite",
"size": "500"</font><br><br><br><font size="2" face="sans-serif">Do the following in this order:</font><br><font size="2" face="sans-serif">        Primary
(#'s below)</font><br><font size="2" face="sans-serif">        Shutdown
Spacewalk</font><br><font size="2" face="sans-serif">        Restore
/etc/hosts, /etc/sysconfig/network, hostname to the original   </font><tt><font size="2">(Linux
7 /etc/hostname)</font></tt><br><font size="2" face="sans-serif">        Failover
(#'s below)</font><br><font size="2" face="sans-serif">         
      READ COMMENTS ABOUT DB..</font><br><font size="2" face="sans-serif">        Shutdown
Spacewalk </font><br><font size="2" face="sans-serif">        Restore
/etc/hosts, /etc/sysconfig/network, hostname to the original  </font><tt><font size="2">(Linux
7 /etc/hostname)</font></tt><br><font size="2" face="sans-serif">        Update
/etc/hosts, /etc/sysconfig/network, hostname on the primary    </font><tt><font size="2">(Linux
7 /etc/hostname)</font></tt><br><font size="2" face="sans-serif">        Startup
Spacewalk</font><br><br><font size="2" face="sans-serif"># update /etc/hosts, 1st line, needs
to point IP address to  "  IP </font><tt><font size="2">spacewalk.network.com</font></tt><font size="2" face="sans-serif"></font><tt><font size="2">spacewalk "</font></tt><br><font size="2" face="sans-serif"># update /etc/sysconfig/network with
HOSTNAME=</font><tt><font size="2">spacewalk.network.com</font></tt><font size="2" face="sans-serif">  </font><tt><font size="2">(Linux 7 /etc/hostname)</font></tt><br><font size="2" face="sans-serif"># run hostname </font><tt><font size="2">spacewalk.network.com</font></tt><br><font size="2" face="sans-serif"># log out and back in to pick up the
changes.<br>## Install the software  PAY ATTENTION IN THE NEXT COMMAND OR ELSE
YOU CAN WIPE THE DB!!!  ANSWER N if the DB already has schema!!!!!</font><br><font size="2" face="sans-serif">## NOTE ---> I use external DB that
has a failover.  That is not covered in this write-up... If you are
going local DB.. Then ?? You will have to failover the DB section when
configuring the Failover server.</font><br><font size="2" face="sans-serif"># spacewalk-setup --disconnected --external-oracle<br></font><br><font size="2" face="sans-serif"># vi /etc/rhn/rhn.conf</font><br><font size="2" face="sans-serif">        Add
the following and adjust accordingly for the Spacewalk</font><br><font size="2" face="sans-serif">        server.satellite.http_proxy
= my_proxy:my_port</font><br><font size="2" face="sans-serif">        disconnected=0
 <----- THIS IS TO SUPPORT ISS</font><br><font size="2" face="sans-serif">        #
The following overrides the defaults in /usr/share/rhn/config-defaults/*.conf</font><br><font size="2" face="sans-serif">        product_name
= THIS IS MINE</font><br><font size="2" face="sans-serif">        java.custom_header
= THIS IS MINE</font><br><font size="2" face="sans-serif">        java.config_file_edit_size
= 128</font><br><font size="2" face="sans-serif">        web.maximum_config_file_size
= 1048576</font><br><font size="2" face="sans-serif">        maximum_config_file_size
= 1048576</font><br><font size="2" face="sans-serif"> </font><br><font size="2" face="sans-serif">        web.default_mail_from
= MINE <root@</font><tt><font size="2">spacewalk.network.com</font></tt><font size="2" face="sans-serif">></font><br><font size="2" face="sans-serif">        #
this setting determines web session timeout, </font><br><font size="2" face="sans-serif">        web.session_cookie_lifetime
= 28800</font><br><font size="2" face="sans-serif">        web.session_database_lifetime
= 28800</font><br><br><font size="2" face="sans-serif">        #BUG
FIX: Increase rhn-search </font><a href="https://access.redhat.com/solutions/322093"><font size="2" color="blue" face="sans-serif">https://access.redhat.com/solutions/322093</font></a><br><font size="2" face="sans-serif">        rhn-search.java.maxmemory
= 2048</font><br><font size="2" face="sans-serif"> </font><br><font size="2" face="sans-serif">        #BUG
FIX: Increase java heap size and logging: </font><a href="https://access.redhat.com/solutions/43122"><font size="2" color="blue" face="sans-serif">https://access.redhat.com/solutions/43122</font></a><br><font size="2" face="sans-serif">        #
/usr/bin/taskomaticd, processes the config files and flags for taskomatic.</font><br><font size="2" face="sans-serif">        taskomatic.java.maxmemory=12288
 #If you have this much RAM</font><br><font size="2" face="sans-serif">        taskomatic.java.initmemory=1024</font><br><font size="2" face="sans-serif">        taskomatic.logfile.maxsize=100m</font><br><font size="2" face="sans-serif">        java.taskomatic_channel_repodata_workers=8</font><br><font size="2" face="sans-serif">        #taskomatic.logfile.loglevel
= DEBUG# legal note to be displayed on the login page</font><br><font size="2" face="sans-serif">        #
(join long lines with \, HTML is okay to use)</font><br><font size="2" face="sans-serif">        java.legal_note
= YOU HAVE REACHED........</font><br><font size="2" face="sans-serif"> </font><br><font size="2" face="sans-serif">        #</font><a href="https://www.redhat.com/archives/spacewalk-list/2016-September/msg00016.html"><font size="2" color="blue" face="sans-serif">https://www.redhat.com/archives/spacewalk-list/2016-September/msg00016.html</font></a><br><font size="2" face="sans-serif">        #
The number of days to wait to hear from a system before warning that it
is not checking in.</font><br><font size="2" face="sans-serif">        #web.system_checkin_threshold
= 5</font><br><br><font size="2" face="sans-serif">#vi /var/lib/rhn/rhn-satellite-prep/satellite-local-rules.conf
 (/var/lib/rhn is on a Filesystem)</font><br><font size="2" face="sans-serif">        serverDOTsatelliteDOThttp_proxy=my_proxy:my_port</font><br><font size="2" face="sans-serif">#vi /etc/sysconfig/tomcat6</font><br><font size="2" face="sans-serif">        #Increase
java heap size and logging: </font><a href="https://access.redhat.com/solutions/43122"><font size="2" color="blue" face="sans-serif">https://access.redhat.com/solutions/43122</font></a><br><font size="2" face="sans-serif">        Modify
Xmx to Xmx16384m  #If you have this much RAM</font><br><font size="2" face="sans-serif">        Modify
Xms to Xms2048m </font><br><font size="2" face="sans-serif">#vi  /etc/httpd/conf.d/zz-mine.conf</font><br><font size="2" face="sans-serif">        #Increase
http Timeout: </font><a href="https://access.redhat.com/solutions/109993"><font size="2" color="blue" face="sans-serif">https://access.redhat.com/solutions/109993</font></a><br><font size="2" face="sans-serif">        Timeout
600 </font><br><font size="2" face="sans-serif">#<u>Move configs from /etc/sysconfig
and snippets to SAN, DFS, etc, to support failover</u></font><br><font size="2" face="sans-serif">        mkdir
-p /somedirectory/spacewalk/configs (owned by root:root)</font><br><font size="2" face="sans-serif">        mv
/etc/sysconfig/tomcat6  /somedirectory/spacewalk/configs</font><br><font size="2" face="sans-serif">        mv
/etc/sysconfig/osa-dispatcher  /somedirectory/spacewalk/configs</font><br><font size="2" face="sans-serif">        mv
/etc/rhn/rhn.conf  /somedirectory/spacewalk/configs</font><br><font size="2" face="sans-serif">        ln
-s  /somedirectory/spacewalk/configs/tomcat6 /etc/sysconfig/tomcat6</font><br><font size="2" face="sans-serif">        ln
-s  /somedirectory/spacewalk/configs/osa-dispatcher /etc/sysconfig/osa-dispatcher</font><br><font size="2" face="sans-serif">        ln
-s  /somedirectory/spacewalk/configs/rhn.conf /etc/rhn/rhn.conf</font><br><font size="2" face="sans-serif">        mkdir
-p /somedirectory/spacewalk/snippets/</font><br><font size="2" face="sans-serif">        mv
/var/lib/rhn/kickstarts/snippets/1 /somedirectory/spacewalk/snippets/  -->
If this fails, mkdir -p /somedirectory/spacewalk/snippets/1</font><br><font size="2" face="sans-serif">        mv
/var/lib/rhn/kickstarts/snippets/2 /somedirectory/spacewalk/snippets/ -->
If this fails, mkdir -p  /somedirectory/spacewalk/snippets/2</font><br><font size="2" face="sans-serif">        ln
-s  /somedirectory/spacewalk/snippets/1 /var/lib/rhn/kickstarts/snippets/1</font><br><font size="2" face="sans-serif">        ln
-s /somedirectory/spacewalk/snippets/2 /var/lib/rhn/kickstarts/snippets/2</font><br><font size="2" face="sans-serif">#vi /etc/logrotate.d/httpd by adding
the following. </font><br><font size="2" face="sans-serif">        #FIX
ME</font><br><font size="2" face="sans-serif">        rotate
4</font><br><font size="2" face="sans-serif">        compress
</font><br><font size="2" face="sans-serif">        dateext</font><br><br><font size="2" face="sans-serif">#Unable to share all of the code...
chkconfig --add ; chkconf on ... /systemctl enable ... <br>#Lots of these snippets of code are functions.. I use the same init scripts
on Spacewalks and the proxies.</font><br><font size="2" face="sans-serif"># vi /etc/int.d/MYSpacewalk</font><br><br><font size="2" face="sans-serif"> <b>  #Start/restart</b></font><br><font size="2" face="sans-serif">   #Disable the spacewalk
components... DO NOT want them to start up because this script takes care
of it ALL.</font><br><font size="2" face="sans-serif">    if [[ "$rhn_product"
== "spacewalk" ]]; then</font><br><font size="2" face="sans-serif">        for spaceservice
in $($rhn_cmd list |grep "4:" |awk '{print $1}'); do</font><br><font size="2" face="sans-serif">           
$rhn_cmd disable $spaceservice</font><br><font size="2" face="sans-serif">        done</font><br><font size="2" face="sans-serif">    elif [[ "$rhn_product"
== "proxy" ]]; then</font><br><font size="2" face="sans-serif">        for proxy_apps
in squid httpd jabberd; do</font><br><font size="2" face="sans-serif">           
chkconfig $proxy_apps off</font><br><font size="2" face="sans-serif">        done</font><br><font size="2" face="sans-serif">    fi</font><br><br><font size="2" face="sans-serif">  #Check if server has </font><tt><font size="2">spacewalk.network.com</font></tt><br><font size="2" face="sans-serif">  serverinf_ip=$(ip route get 1
| awk '{print $NF;exit}' |tr -d '\n')</font><br><font size="2" face="sans-serif">  for cname_ip in $(/usr/bin/host
$spacecname|grep address|awk -F" address " '{print $2}'); do</font><br><font size="2" face="sans-serif">.......</font><br><font size="2" face="sans-serif">  </font><br><font size="2" face="sans-serif"> <br> </font><br><font size="2" face="sans-serif"> # If the server has the DNS alias
 </font><tt><font size="2">spacewalk.network.com</font></tt><br><tt><font size="2">      check_update_files -> which
does the following</font></tt><br><font size="2" face="sans-serif">        #
validate or update /etc/hosts, 1st line, needs to point IP address to  
" IP </font><tt><font size="2">spacewalk.network.com</font></tt><font size="2" face="sans-serif"></font><tt><font size="2">spacewalk "</font></tt><br><tt><font size="2">        sed and echo here</font></tt><br><font size="2" face="sans-serif">        #
validate or update /etc/sysconfig/network with HOSTNAME=</font><tt><font size="2">spacewalk.network.com
  (Linux 7 /etc/hostname)</font></tt><br><font size="2" face="sans-serif">           
    sed -i "s/^HOSTNAME=.*/HOSTNAME=$what_I_AM_LOOKINGFOR/"
/etc/sysconfig/network</font><br><font size="2" face="sans-serif">        #
run hostname </font><tt><font size="2">spacewalk.network.com</font></tt><br><tt><font size="2">    #check to see if it is already running<br>                spacewalk-service
restart</font></tt><br><tt><font size="2">          or</font></tt><br><tt><font size="2">           
     spacewalk-service start<br> else</font></tt><br><tt><font size="2">        check_update_files
-> which also does the following</font></tt><br><font size="2" face="sans-serif">        #
validate or update /etc/hosts, 1st line, needs to point IP address to  "
IP  </font><tt><font size="2">primaryhost/failoverhost.network.com</font></tt><font size="2" face="sans-serif"></font><tt><font size="2">primaryhost/failoverhost "</font></tt><br><tt><font size="2">        sed and echo here</font></tt><br><font size="2" face="sans-serif">        #
validate or update /etc/sysconfig/network with HOSTNAME=</font><tt><font size="2">primaryhost/failoverhost.network.com</font></tt><font size="2" face="sans-serif"></font><br><font size="2" face="sans-serif">           
    sed -i "s/^HOSTNAME=.*/HOSTNAME=$what_I_AM_LOOKINGFOR/"
/etc/sysconfig/network    </font><tt><font size="2">(Linux 7 /etc/hostname)</font></tt><br><font size="2" face="sans-serif">        #
run hostname </font><tt><font size="2">primaryhost/failoverhost.network.com</font></tt><font size="2" face="sans-serif"></font><br><font size="2" face="sans-serif"> </font><tt><font size="2">  
 #If not already stopped<br>                spacewalk-service
stop</font></tt><br><br><font size="2" face="sans-serif"><b>  #Stop</b></font><br><font size="2" face="sans-serif"><b>        </b>check_update_files
(from above)</font><br><font size="2" face="sans-serif">        </font><tt><font size="2"> #If
not already stopped<br>                spacewalk-service
stop</font></tt><br><font size="2" color="#2f2f2f" face="Arial">       
        </font><br><font size="2" face="sans-serif">- Thanks and good luck</font><br><br><br><br><br><font size="1" color="#5f5f5f" face="sans-serif">From:      
 </font><font size="1" face="sans-serif">ericb@enrsystems.com</font><br><font size="1" color="#5f5f5f" face="sans-serif">To:      
 </font><font size="1" face="sans-serif">spacewalk-list@redhat.com</font><br><font size="1" color="#5f5f5f" face="sans-serif">Date:      
 </font><font size="1" face="sans-serif">02/17/2017 02:15 PM</font><br><font size="1" color="#5f5f5f" face="sans-serif">Subject:    
   </font><font size="1" face="sans-serif">[Spacewalk-list]
Building Spacewalk With a DNS Alias for Failover</font><br><font size="1" color="#5f5f5f" face="sans-serif">Sent by:    
   </font><font size="1" face="sans-serif">spacewalk-list-bounces@redhat.com</font><br><hr noshade=""><br><br><br><tt><font size="2">This email originated from outside of the company.
 Please use discretion if opening attachments or clicking on links.<br><br>I have a current running Spacewalk Server, and a 2nd Failover server.  The
<br>current configuration is quite painful to failover.  <br><br>I'm currently standing up a new server on 2.6.  The server's real
fqdn is <br>primaryhost.network.com, and the failover is failoverhost.network.com.
 I have <br>a DNS alias of spacewalk.network.com that is currently pointing at the
same IP <br>as primaryhost.network.com.  I want to install it using the DNS alias.
 I <br>can't change the "real" hostname.<br><br>How can I run this with dual hostnames, and have Spacewalk use the the
Alias, <br>especially for cert creation, etc.<br><br>The logic being that bringing the failover online should be much easier,
<br>restore the backups to the failover and swing DNS to have the Alias point
at <br>the IP of the failover server.<br><br>Thoughts?  Am I crazy?  I feel like this should work.<br><br>_______________________________________________<br>Spacewalk-list mailing list<br>Spacewalk-list@redhat.com<br></font></tt><a href="https://www.redhat.com/mailman/listinfo/spacewalk-list"><tt><font size="2">https://www.redhat.com/mailman/listinfo/spacewalk-list</font></tt></a><tt><font size="2"><br><br></font></tt><br><br>
<br>
<br>
**<br>
<br>
<br>
<br>
This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient.  Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law.  If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies.<br>
<br>
**<br></body></html>