Bug 1576626

Summary: rhnreg_ks Internal Server Error value too long for type character varying(18) insert into rhnServerNetInterface
Product: [Community] Spacewalk Reporter: LnxGnome <redhat>
Component: ServerAssignee: Michael Mráka <mmraka>
Status: CLOSED EOL QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.6   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-21 13:26:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description LnxGnome 2018-05-10 01:11:49 UTC
Description of problem:
rhnreg_ks returns a "Internal Server Error" when registering a physical server with Infiniband interfaces.

Version-Release number of selected component (if applicable):
spacewalk 2.6.1

How reproducible:
Every time.

Steps to Reproduce:
1. Usual client install steps...
  yum install -y http://yum.spacewalkproject.org/2.6/RHEL/7/x86_64/spacewalk-client-repo-2.6-0.el7.noarch.rpm
  yum install -y rhn-client-tools rhn-check rhn-setup rhnsd m2crypto yum-rhn-plugin osad rhncfg-actions rhncfg-management scap-security-guide
  yum install -y http://spacewalk.MYDOMAIN.XXX/pub/rhn-org-trusted-ssl-cert-1.0-5.noarch.rpm
  
2. rhnreg_ks --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT --serverUrl=https://spacewalk.MYDOMAIN.XXX/XMLRPC --activationkey=1-basic-centos7-x86_64


Actual results:
An error has occurred:
rhn-plugin: Error communicating with server. The message was:
Internal Server Error
See /var/log/up2date for more information

Postgresql Server journal shows...
May 09 20:19:04 spacewalkdb postgres[11747]: [2-1] 2018-05-09 20:19:04.499 EDT ERROR:  value too long for type character varying(18)
May 09 20:19:04 spacewalkdb postgres[11747]: [2-2] 2018-05-09 20:19:04.499 EDT STATEMENT:  insert into rhnServerNetInterface
May 09 20:19:04 spacewalkdb postgres[11747]: [2-3]                     (hw_addr, module, name, server_id) values ('80:00:02:08:fe:80:00:00:00:00:00:00:00:02:c9:03:00:0f:54:cf', 'ib_ip
Ma


Expected results:
rhnServerNetInterface : HW_ADDR	[VARCHAR2(18)] needs to be able to hold a 60 char address.

Additional info:
System being registered is a Dell R710 with a dual port Infiniband card, configured with IP over IB.

lspci:
0b:00.0 InfiniBand: Mellanox Technologies MT26418 [ConnectX VPI PCIe 2.0 5GT/s - IB DDR / 10GigE] (rev a0)

10: ib0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 65520 qdisc pfifo_fast master bond1 state UP mode DEFAULT qlen 256
    link/infiniband 80:00:02:08:fe:80:00:00:00:00:00:00:00:02:c9:03:00:0f:54:cf brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff

11: ib1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 65520 qdisc pfifo_fast master bond1 state UP mode DEFAULT qlen 256
    link/infiniband 80:00:02:09:fe:80:00:00:00:00:00:00:00:02:c9:03:00:0f:54:d0 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff

Comment 1 LnxGnome 2018-05-10 01:14:28 UTC
Full last line from postgresql..
May 09 20:19:04 spacewalkdb postgres[11747]: [2-3]                     (hw_addr, module, name, server_id) values ('80:00:02:08:fe:80:00:00:00:00:00:00:00:02:c9:03:00:0f:54:cf', 'ib_ipoib', 'ib0', 1000010016)

Comment 2 LnxGnome 2018-05-10 02:36:42 UTC
Assuming the DB Schema docs are up to date, this problem should occur in spacewalk 2.8 also.
https://spacewalkproject.github.io/documentation/schema-doc/table-RHNSERVERNETINTERFACE.html

Comment 3 Michael Mráka 2019-10-21 13:26:19 UTC
Spacewalk 2.8 (and older) has already reached it's End Of Life.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before end of life. If you would still like
to see this bug fixed and are able to reproduce it against current version
of Spacewalk 2.9, you are encouraged change the 'version' and re-open it.