Description of problem: I renamed hostname in only IPv6 enviroment. Hostname had IPv6 address and then run spacewalk-hostname-rename. Result was fail "psql:<stdin>:1: ERROR: value too long for type character varying(15)" Version-Release number of selected component (if applicable): spacewalk-utils-1.7.15-31.el6sat How reproducible: always Steps to Reproduce: 1. Install satellite in IPv6 only IPv6 only environment 2. Verify that hostname has IPv6 address 3. Change hostname for this machine 4. Run spacewalk-hostname-rename Actual results: Validating IP ... OK ============================================= hostname: sat.redhat.com ip: 2000:dead:beef:a:5054:ff:fe7e:eb4 ============================================= Stopping rhn-satellite services ... OK Testing DB connection ... OK Updating /etc/rhn/rhn.conf ... OK Actual SSL key pair package: rhn-org-httpd-ssl-key-pair-sat-1.0-17.noarch No need to re-generate SSL certificate. Regenerating new bootstrap client-config-overrides.txt ... OK Updating NOCpulse.ini ... OK Updating monitoring data ... psql:<stdin>:1: ERROR: value too long for type character varying(15) FAILED Fix the problem and run /usr/bin/spacewalk-hostname-rename again Expected results: Application run without error.
What error do you get when you try it on Oracle-based installation?
I assume that the code failing is function update_monitoring_data { NOCPULSE_OLD_PUBLIC_KEY=`cat $NOCPULSE_PUBLIC_KEY_FILE` spacewalk-sql --select-mode - >>$LOG <<EOS UPDATE rhn_sat_cluster SET vip = '$IP' WHERE public_key LIKE '${NOCPULSE_OLD_PUBLIC_KEY}%'; UPDATE rhn_sat_node SET ip = '$IP' WHERE EXISTS (SELECT 1 FROM rhn_sat_cluster RSC WHERE RSC.public_key LIKE '${NOCPULSE_OLD_PUBLIC_KEY}%' AND sat_cluster_id = RSC.recid); COMMIT; $DBSHELL_QUIT EOS }
spacewalk.git: 2371ce74d6ec383fb839a394b7f71e24e99aff73
I tried it on Oracle-based installation and I didn't get any error. Hostname was renamed without a problem.
Make sure monitoring is enabled on the satellite server. You won't hit the bug otherwise.
If monitoring was disabled or enabled on postgresql, I got same error. On satellite (Oracle-based) monitoring was enabled and I didn't get any error. >> rpm -qa | grep spacewalk-utils spacewalk-utils-1.7.15-32.el6sat.noarch >> spacewalk-hostname-rename 2000:dead:beef:a:5054:ff:fedc:b4ee Validating IP ... OK ============================================= hostname: sat55.redhat.com ip: 2000:dead:beef:a:5054:ff:fedc:b4ee ============================================= Stopping rhn-satellite services ... OK Testing DB connection ... OK Updating /etc/rhn/rhn.conf ... OK Actual SSL key pair package: rhn-org-httpd-ssl-key-pair-sat55-1.0-2.noarch No need to re-generate SSL certificate. Regenerating new bootstrap client-config-overrides.txt ... OK Updating NOCpulse.ini ... OK Updating monitoring data ... OK Pushing monitoring scouts ... OK Updating other DB entries ... OK Changing cobbler settings ... OK Changing jabberd settings ... OK Starting rhn-satellite services ... O
This issue is resolved with the release of RHN Satellite 5.5. As of September 20th 2012, RHN Satellite 5.5 has been generally available. Release Notes and other 5.5 documentation can be found here: https://access.redhat.com/knowledge/docs/Red_Hat_Network_Satellite/ The associated Errata for the 5.5 release are: 5.5 Satellite GA Errata - http://rhn.redhat.com/errata/RHEA-2012-1296.html 5.5 Upgrade Errata - http://rhn.redhat.com/errata/RHEA-2012-1298.html 5.5 RHN Proxy GA Errata - http://rhn.redhat.com/errata/RHEA-2012-1297.html 5.5 RHN Tools GA Errata - http://rhn.redhat.com/errata/RHEA-2012-1299.html Regards, Clifford - Engineering Manager, Satellite