[Spacewalk-list] SQL error in SSM after update to 2.9

2019-01-31 Thread Hailer, Christian
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hello all,

I recently updated Spacewalk from version 2.8 to 2.9. Since then I'm unable to 
manage multiple servers at once.
As soon as I select some servers on the "Systems" tab and click the "Manage" 
button, I get an internal server error. Looking at the Tomcat catalina.out log, 
I can see the following SQL error:


2019-02-01 07:14:02,504 [TP-Processor11] ERROR 
com.redhat.rhn.common.db.datasource.CachedStatement - Error while processing 
cached statement sql: SELECT COUNT(*) as count
  FROM rhnSet
  WHERE
rhnSet.user_id = ? AND
rhnSet.label = ? AND (
  SELECT COUNT(*)
FROM rhnServerFeaturesView
WHERE rhnSet.element = rhnServerFeaturesView.server_id
  AND rhnServerFeaturesView.label = ?
) = 0;
com.redhat.rhn.common.db.WrappedSQLException: ORA-00933: SQL command not 
properly ended

at 
com.redhat.rhn.common.translation.SqlExceptionTranslator.oracleSQLException(SqlExceptionTranslator.java:82)
at 
com.redhat.rhn.common.translation.SqlExceptionTranslator.sqlException(SqlExceptionTranslator.java:42)
at 
com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:143)
at 
com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:414)
at 
com.redhat.rhn.common.db.datasource.CachedStatement.internalExecute(CachedStatement.java:293)
at 
com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:232)
at 
com.redhat.rhn.common.db.datasource.SelectMode.execute(SelectMode.java:90)
at 
com.redhat.rhn.manager.BaseManager.makeDataResult(BaseManager.java:57)
at 
com.redhat.rhn.manager.system.SystemManager.countSystemsInSetWithoutFeature(SystemManager.java:1333)
at 
com.redhat.rhn.common.security.acl.Access.aclAllSystemsInSetHaveFeature(Access.java:208)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.redhat.rhn.common.security.acl.Acl.evalAcl(Acl.java:470)
at com.redhat.rhn.frontend.nav.AclGuard.canRender(AclGuard.java:69)
at 
com.redhat.rhn.frontend.nav.RenderGuardComposite.canRender(RenderGuardComposite.java:49)
at com.redhat.rhn.frontend.nav.Renderable.canRender(Renderable.java:126)
at 
com.redhat.rhn.frontend.nav.DialognavRenderer.navNodeInactive(DialognavRenderer.java:102)
at 
com.redhat.rhn.frontend.nav.RenderEngine.renderLevel(RenderEngine.java:96)
at com.redhat.rhn.frontend.nav.RenderEngine.render(RenderEngine.java:58)
at 
com.redhat.rhn.frontend.taglibs.helpers.RenderUtils.render(RenderUtils.java:148)
at 
com.redhat.rhn.frontend.taglibs.helpers.RenderUtils.renderNavigationMenu(RenderUtils.java:132)
at 
com.redhat.rhn.frontend.taglibs.helpers.RenderUtils.renderNavigationMenu(RenderUtils.java:73)
at 
com.redhat.rhn.frontend.taglibs.NavMenuTag.doStartTag(NavMenuTag.java:53)
at 
org.apache.jsp.WEB_002dINF.pages.ssm.ssmindex_jsp._jspx_meth_rhn_005fdialogmenu_005f0(Unknown
 Source)
at 
org.apache.jsp.WEB_002dINF.pages.ssm.ssmindex_jsp._jspService(Unknown Source)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1083)
at 
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:396)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:232)
at 
com.redhat.rhn.frontend.struts.RhnRequestProcessor.process(RhnRequestProcessor.java:105)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1926)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:451)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli

Re: [Spacewalk-list] Spacewalk 2.9 and Ubuntu clients Part 2 of 2

2019-01-31 Thread Paul-Andre Panon
On Tue, 29 Jan 2019 14:22:53 -0500, James Krych 
wrote

>So if I understand this correctly, I already have the packages installed
for the client in
>question. Using this script will both install the packages and register
the client?

>Respectfully,

>James

As long as you have the packages where they're expected. Not a problem for
the Ubuntu 16.04 packages since it can pick them up off the Internet
repos. But since the Spacewalk client isn't in the Ubuntu 18.04 repos, it
tries to download them from the spacewalk server (you need to edit the
variable at the top of the script to be your server name). I kind of
hacked our script a bit to replace the server name with the variable, so I
admittedly haven't tested the modified script. You may need to correct
some minor errors but it should get you started.

And James earlier also wrote:

>Since I have two types of clients, Ubuntu 16.04 and 18.04, do I need two
different activation keys? I currently do have one setup.

What do you have set up for the Base Channel for that activation key? I
don't know/remember if the Spacewalk Default works for Ubuntu versions and
CentOS like it does for Red Hat EL and Fedora.  I doubt it since the
support for Ubuntu is limited.

"Choose 'Spacewalk Default' to allow systems to register to the default
Red Hat provided channel that corresponds to their installed version of
Red Hat Enterprise Linux. You may also choose particular Red Hat provided
channels or custom base channels here, but please note if a system using
this key is not compatible with the selected channel, it will fall back to
its Red Hat default channel."

We created 4 activation keys, 1 for CentOS 7 and one for each of the
in-use LTS versions of Ubuntu. On the Child Channels tab of the activation
key, we selected the child channels (i.e. xenial-spacewalk-client,
xenial-universe, xenial-security, xenial-security-universe) that we want
to be enabled on servers by default. When the server is registered, in
most cases the server will only need to be added to a system group, unless
it needs a special channel/repo for a PPA.  The script also disables the
corresponding main/universe Internet sources in /etc/sources.list. If you
also have channels for multiverse, you would want to add a perl -pi line
to comment out the multiverse sources.

That appears to work for us, but you would need to figure out what your
needs (and resource constraints) are and adjust accordingly.

Cheers,

Paul-Andre

___
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list


[Spacewalk-list] A few more questions and some results

2019-01-31 Thread James Krych
*Taking steps forward and a few missteps along the way. *

*My Initial questions are:*

*1.) I know I'll get an email from my Spacewalk server if something happens
during an apt-get update. However, is there a setting to have Spacewalk
contact me if a client does need to be upgraded?*

*2.) Once the client has been registered, do I simply rename the
sources.list file in order to ensure the updates are strictly from the
registered channels?*

*Here is what I got from my first client after trying to apt-get update:*

W: The repository 'spacewalk://spacewalk.mdc.musc.edu ubuntu_channel
Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore
potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration
details.
W: The repository 'spacewalk://spacewalk.mdc.musc.edu ubuntu_16_security
Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore
potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration
details.
W: The repository 'spacewalk://spacewalk.mdc.musc.edu ubuntu_16_updates
Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore
potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration
details.
#grouper-dev-loader-v:/etc/apt:

*I am guessing I can go straight to
http://us.archive.ubuntu.com/ubuntu/dists/xenial-security/main/binary-amd64/

to retrieve the RELEASE file?*

*Finally,*

*I got this sent to me by my Spacewalk Server:*
Exception reported from spacewalk
Time: Thu Jan 31 13:03:55 2019
Exception type 
Exception while handling function repodata
Request object information:
URI: ///XMLRPC/GET-REQ/ubuntu_16_security/repodata/Packages.diff/Index
Remote Host: grouper-dev-loader-v.mdc.musc.edu
Server Name: spacewalk.mdc.musc.edu:443
Headers passed in:
Accept-Encoding: identity
CONTEXT_DOCUMENT_ROOT: /var/www/html
CONTEXT_PREFIX:
DOCUMENT_ROOT: /var/www/html
GATEWAY_INTERFACE: CGI/1.1
HTTP_ACCEPT_ENCODING: identity
HTTP_HOST: spacewalk.mdc.musc.edu
HTTP_X_RHN_AUTH: iETk+fc0/xkpaVTOFfM5IkZa1Ose9/Yzr3vEsJ85KqI=
HTTP_X_RHN_AUTH_EXPIRE_OFFSET: 3600.0
HTTP_X_RHN_AUTH_SERVER_TIME: 1548957835.75
HTTP_X_RHN_AUTH_USER_ID:
HTTP_X_RHN_SERVER_ID: 110001
HTTP_X_RHN_TRANSPORT_CAPABILITY: follow-redirects=3
Host: spacewalk.mdc.musc.edu
PATH_INFO: /GET-REQ/ubuntu_16_security/repodata/Packages.diff/Index
PATH_TRANSLATED:
/var/www/html/GET-REQ/ubuntu_16_security/repodata/Packages.diff/Index
QUERY_STRING:
REMOTE_ADDR: 128.23.182.201
REMOTE_PORT: 53630
REQUEST_METHOD: GET
REQUEST_SCHEME: https
REQUEST_URI:
///XMLRPC/GET-REQ/ubuntu_16_security/repodata/Packages.diff/Index
SCRIPT_FILENAME: /usr/share/rhn/wsgi/xmlrpc.py
SCRIPT_NAME: /XMLRPC
SCRIPT_URI:
https://spacewalk.mdc.musc.edu/XMLRPC/GET-REQ/ubuntu_16_security/repodata/Packages.diff/Index
SCRIPT_URL:
/XMLRPC/GET-REQ/ubuntu_16_security/repodata/Packages.diff/Index
SERVER_ADDR: 128.23.191.174
SERVER_ADMIN: root@localhost
SERVER_NAME: spacewalk.mdc.musc.edu
SERVER_PORT: 443
SERVER_PROTOCOL: HTTP/1.1
SERVER_SIGNATURE:
SERVER_SOFTWARE: Apache
UNIQUE_ID: XFM4i7jv04S7D8jviB5vDwU
X-RHN-Auth: iETk+fc0/xkpaVTOFfM5IkZa1Ose9/Yzr3vEsJ85KqI=
X-RHN-Auth-Expire-Offset: 3600.0
X-RHN-Auth-Server-Time: 1548957835.75
X-RHN-Auth-User-Id:
X-RHN-Server-Id: 110001
X-RHN-Transport-Capability: follow-redirects=3
mod_wsgi.application_group: spacewalk.mdc.musc.edu|/xmlrpc
mod_wsgi.callable_object: application
mod_wsgi.enable_sendfile: 0
mod_wsgi.handler_script:
mod_wsgi.input_chunked: 0
mod_wsgi.listener_host:
mod_wsgi.listener_port: 443
mod_wsgi.process_group:
mod_wsgi.queue_start: 1548957835954332
mod_wsgi.request_handler: wsgi-script
mod_wsgi.script_reloading: 1
mod_wsgi.version: (3, 4)
wsgi.errors: 
wsgi.file_wrapper: 
wsgi.input: 
wsgi.multiprocess: True
wsgi.multithread: False
wsgi.run_once: False
wsgi.url_scheme: https
wsgi.version: (1, 0)
Extra information about this error:
Response sent back to the caller:
While running 'repodata': caught
 : repodata() takes exactly 2 arguments (3
given)



Exception Handler Information
Traceback (most recent call last):
  File
"/usr/lib/python2.7/site-packages/spacewalk/server/apacheRequest.py", line
135, in call_function
response = func(*params)
TypeError: repodata() takes exactly 2 arguments (3 given)