Re: [Spacewalk-list] 回复: Can spacewalk support Redhat Linux 8, or can not ?

2020-06-22 Thread Rob Sterenborg
The replacement project is Foreman+Katello as mentioned below. I found it 
harder to use compared to Spacewalk, but YMMV. Since we only use Spacewalk as a 
software repository, we decided to start using Nexus instead.

Nexus doesn’t require client software, it can be configured to serve as a Yum 
proxy for external Yum repositories and it will cache the RPM’s it downloaded 
from them. On the clients you only require .repo files pointing to Nexus. This 
will only work for you if you a) only use it as a software repository (which 
you apparently do), and b) if you have a way to distribute/manage the .repo 
files across the clients if you have lots of servers.


From: spacewalk-list-boun...@redhat.com  On 
Behalf Of ???
Sent: Monday, June 22, 2020 10:01
To: spacewalk-list@redhat.com
Subject: [Spacewalk-list] 回复: Can spacewalk support Redhat Linux 8, or can not ?

Thanks for your answer.

I want to have a  try to use spacewalk to manage linux servers, but now the 
projrct is stopped, could you give me same advice to choose what others instead 
of spacewalk ?




发件人: 
spacewalk-list-boun...@redhat.com 
mailto:spacewalk-list-boun...@redhat.com>> 
代表 Andreas Dijkman
发送时间: 2020年6月22日 15:27
收件人: spacewalk-list@redhat.com
主题: Re: [Spacewalk-list] Can spacewalk support Redhat Linux 8, or can not ?

Satellite is the RedHat-version that is used by RedHat and its systems. I think 
it's paid or maybe you get it with a subscription, I don’t know.

There is almost always an OpenSource Upstream-version of RedHat-products and 
Spacewalk is the upstream-version of Satellite 5. The Foreman + Katello is the 
upstream-version of Satellite 6.

But from my point of few, if you are not already using Spacewalk at the moment, 
don’t start using it for new environments. Use something else that fits your 
needs.


On 22 Jun 2020, at 08:58, 崔涛的个人邮箱 mailto:sz_cui...@163.com>> 
wrote:

Satellite is opensource or commercial software ?




发件人: 
spacewalk-list-boun...@redhat.com 
mailto:spacewalk-list-boun...@redhat.com>> 
代表 Andreas Dijkman
发送时间: 2020年6月22日 14:51
收件人: mailto:spacewalk-list@redhat.com>> 
mailto:spacewalk-list@redhat.com>>
主题: Re: [Spacewalk-list] Can spacewalk support Redhat Linux 8, or can not ?

Because Spacewalk is old (first release 2008) and Redhat has been focussing on 
the newer version RedHat Satellite 6, The Foreman + Katello and a bunch of 
other plugins.

But SpaceWalk 2.10 on CentOS 7 and CentOS 8 should work fine.

Regards,
Andreas Dijkman


On 22 Jun 2020, at 08:36, 崔涛的个人邮箱 mailto:sz_cui...@163.com>> 
wrote:

I mean that spacewalk server is installed on centos7, and centos8 is client 
subscribing the channel on the spacewalk server.

Since Release 8 can subscribing spacewalk server, why spacewalk project stopped 
?




发件人: 
spacewalk-list-boun...@redhat.com 
mailto:spacewalk-list-boun...@redhat.com>> 
代表 Andreas Dijkman
发送时间: 2020年6月22日 14:10
收件人: mailto:spacewalk-list@redhat.com>> 
mailto:spacewalk-list@redhat.com>>
主题: Re: [Spacewalk-list] Can spacewalk support Redhat Linux 8, or can not ?

Do you mean as client or as server?

It cannot be used on RHEL/CentOS 8 as server but CentOS 8 is supported as 
client and maybe even RHEL8 (never tried it, I use OracleLinux 8). However the 
entire ModuleStream-setup is different in regards to pure RPM-versions in 
CentOS 7 and below.

Regards,
Andreas DIjkman



On 22 Jun 2020, at 07:40, 崔涛的个人邮箱 mailto:sz_cui...@163.com>> 
wrote:

Anyone here ??



发件人: 
spacewalk-list-boun...@redhat.com 
mailto:spacewalk-list-boun...@redhat.com>> 
代表 崔涛
发送时间: 2020年6月21日 21:37
收件人: spacewalk-list@redhat.com
主题: [Spacewalk-list] Can spacewalk support Redhat Linux 8, or can not ?


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

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

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

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

Re: [Spacewalk-list] Spacewalk Filters

2020-02-18 Thread Rob Sterenborg
This works for me on the oVirt repo:: -*ppc64le

So you could try: -*armhfp and add any other architecture you don’t want to 
sync.


From: spacewalk-list-boun...@redhat.com  On 
Behalf Of Raymond Setchfield
Sent: Tuesday, February 18, 2020 16:14
To: spacewalk-list@redhat.com
Subject: Re: [Spacewalk-list] Spacewalk Filters

I was looking to keep  grafana-*.x86_64.rpm but get rid of anything else

Ray 

On Tue, Feb 18, 2020 at 11:47 AM Robert Paschedag 
 wrote:
Shouldn't it be "-grafana..."?

Robert


⁣sent from my mobile device​


 Originale Nachricht 
Von: Raymond Setchfield 
Gesendet: Tue Feb 18 12:11:22 GMT+01:00 2020
An: mailto:spacewalk-list@redhat.com
Betreff: [Spacewalk-list] Spacewalk Filters

Hi All,

I am receiving an error message when I am trying to pull down the grafana
packages, and I thought I'd use the filters to remove the appropriate
packages.

10:58:48     197/200 : grafana-6.2.3-1.x86_64.rpm
10:58:48     198/200 : grafana-5.2.2-1.armhfp.rpm
10:58:48     199/200 : grafana-6.2.2-1.armhfp.rpm
10:58:48     200/200 : grafana-6.3.6-1.armhfp.rpm
10:58:49
10:58:49   Importing packages to DB:
               Importing packages:
|##| 100.0%
10:59:42
10:59:42   Linking packages to the channel.
10:59:42 ERROR: Unknown arch armhfp
10:59:43 Sync of channel completed in 0:03:32.
10:59:43 Total time: 0:03:32

So using the filters I am tried;
+grafana-*.x86_64.rpm

and I am receiving this from the repo  sync
11:06:44   Processing repository with URL:
https://packages.grafana.com/oss/rpm
11:06:45     Packages in repo:               201
11:06:45     Packages passed filter rules:     0
11:06:45     No new packages to sync.
11:06:45
11:06:45   Errata in repo: 0.
11:06:45 Sync of channel completed in 0:01:24.
11:06:45 Total time: 0:01:24

Can anyone suggest what I am doing wrong on the filters?

Thanks

Ray




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


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

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

[Spacewalk-list] Spacewalk stopped working

2019-06-26 Thread Rob Sterenborg
We're running Spacewalk 2.7 on CentOS 7.

Yesterday all yum commands requiring the Spacewalk server started failing on 
all of our Spacewalk clients.


The Apache ssl_error_log logfile has a lot of:
=
[Tue Jun 25 14:51:32.981919 2019] [proxy_ajp:error] [pid 48172] [client 
192.168.x.y:37042] AH00877: read zero bytes, expecting 122 bytes
=


The Tomcat localhost_access_log..txt logfile has a lot of:
=
192.168.x.y - - [25/Jun/2019:14:51:33 +0200] "GET /rhn/errors/404.jsp HTTP/1.1" 
404 -
=


=
# rhn-profile-sync -vvv
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
D: opening  db environment /var/lib/rpm cdb:0x401
D: opening  db index   /var/lib/rpm/Packages 0x400 mode=0x0
D: locked   db index   /var/lib/rpm/Packages
D: opening  db index   /var/lib/rpm/Providename 0x400 mode=0x0
logging into up2date server
D: rpcServer: Calling XMLRPC up2date.login A protocol error occurred: Not Found 
, attempt #1, Could not find URL, spacewalk.domain.local /XMLRPC Check server 
name and/or URL, then retry

There was a RhnServerException while testing login:

D: closed   db index   /var/lib/rpm/Providename
D: closed   db index   /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm
=
/var/log/up2date:
[Wed Jun 26 10:54:02 2019] up2date logging into up2date server
[Wed Jun 26 10:54:02 2019] up2date A protocol error occurred: Not Found , 
attempt #1,
[Wed Jun 26 10:54:02 2019] up2date Could not find URL, spacewalk.domain.local 
/XMLRPC
[Wed Jun 26 10:54:02 2019] up2date Check server name and/or URL, then retry
=

I'm unsure why the message above says "Could not find URL, 
spacewalk.domain.local /XMLRPC" (the space between the hostname and path), 
because in /etc/sysconfig/rhn/up2date I have:
=
serverURL=https://spacewalk.domain.local/XMLRPC
=
Is that cosmetics?


I can resolve the actual "spacewalk.domain.local" just fine, tcp ports 80 and 
443 are accessible from the client host experiencing issues.
I can use the web GUI without issues, and also the local spacecmd works just 
fine.


In the Apache config I have:
=

LoadModule wsgi_module modules/mod_wsgi.so


WSGIPythonPath "/usr/share/rhn"

WSGIScriptAlias /APP /usr/share/rhn/wsgi/app.py
WSGIScriptAlias /APPLET /usr/share/rhn/wsgi/applet.py
WSGIScriptAlias /CONFIG-MANAGEMENT /usr/share/rhn/wsgi/config.py
WSGIScriptAlias /CONFIG-MANAGEMENT-TOOL /usr/share/rhn/wsgi/config_tool.py
WSGIScriptAlias /PACKAGE-PUSH /usr/share/rhn/wsgi/package_push.py
WSGIScriptAlias /SAT /usr/share/rhn/wsgi/sat.py
WSGIScriptAlias /SAT-DUMP-INTERNAL /usr/share/rhn/wsgi/sat_dump.py
WSGIScriptAlias /XMLRPC /usr/share/rhn/wsgi/xmlrpc.py

= 2.4>

Require all granted


=

This python scripts exist, file owner/mode: root:root 644.
AFAICS it seems like this part is not working. But I'm simply not sure what is 
wrong.


Can someone please point me to exactly what it is that is not working anymore 
and how to fix it.
I can provide any additional config needed; right now I'm unsure which that 
would be.


Thanks,
Rob


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


Re: [Spacewalk-list] Error connecting to jabber

2017-06-01 Thread Rob Sterenborg
To be honest, I would also like it if a Spacewalk upgrade (say, from 2.6 to 2.7 
somewhere in the future) would not touch current configuration. So that if I 
configure PostgreSQL it will not revert to sqlite or so. (Unless of course it 
really some changes to keep things working.) It's not that I can't reconfigure, 
but it can take you off-guard.


--
Rob


> -Original Message-
> From: spacewalk-list-boun...@redhat.com [mailto:spacewalk-list-
> boun...@redhat.com] On Behalf Of Wilkinson, Matthew
> Sent: donderdag 1 juni 2017 15:32
> To: spacewalk-list@redhat.com
> Subject: Re: [Spacewalk-list] Error connecting to jabber
> 
> Good call. Thanks Michael. I have been configuring my Spacewalk instances
> with PostgreSQL and it's working well so I agree with Jan-Albert that it'd
> be nice to have the official Spacewalk documentation updated with the DB
> options and configs for using Postgres.
> 
> --Matthew Wilkinson
> 
> 
> -Original Message-
> From: spacewalk-list-boun...@redhat.com [mailto:spacewalk-list-
> boun...@redhat.com] On Behalf Of Michael Mraka
> Sent: Thursday, June 01, 2017 03:41
> To: spacewalk-list@redhat.com
> Subject: Re: [Spacewalk-list] Error connecting to jabber
> 
> [This is an external email. Be cautious with links, attachments and
> responses.]
> 
> **
> Ree, Jan-Albert van:
> > While I agree that sqlite is better than berkeleydb why not make
> > PostgreSQL the default if the PostgreSQL database is already being set
> > up during installation ( ie spacewalk-setup-postgresql is called )
> 
> We try to keep configuration unified accross different spacewalk variants.
> And because jabberd can't connect to oracle we would need to configure it
> with sqlite anyway in case of spacewalk with oracle backend.
> 
> If you want to try jabberd with postgresql backend see Avi's blog
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__omg.dje.li_2017_03_configuring-2Dspacewalks-2Djabberd-2Dto-2Duse-2Da-
> 2Dpostgresql-
> 2Dbackend_&d=DwIGaQ&c=GUDVeAVg1gjs_GJkmwL1m3gEzDND7NeJG5BIAX_2yRE&r=zxSMv3Yy
> n0u8GiLjBm805qsHQ-PQnlWklaJFaNwJsRdou0Rx32Ld6bt57-
> Tq1kdA&m=VpK_HJV5w79miGmmoWw-Di5ULIgMMmIkW7JWZLrUctI&s=pCbYSthwAo2SGk-
> gle2dZoAwXrKOelWZxjmkvQUL4tM&e=
> 
> 
> > Our modest installation (roughly 80 clients) still wasn't rock solid using
> sqlite (instead of crashing almost daily it became a 'once a month' thing
> where the DB got corrupted), only after moving to PostgreSQL do we now have
> an osa-dispatcher/jabber/osad setup which requires virtually no maintenance
> and is pretty much crash-proof.
> >
> > Regards,
> > --
> > Jan-Albert
> 
> Regards,
> 
> --
> Michael Mráka
> System Management Engineering, Red Hat
> 
> ___
> Spacewalk-list mailing list
> Spacewalk-list@redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list
> 
> ___
> Spacewalk-list mailing list
> Spacewalk-list@redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list

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

Re: [Spacewalk-list] Syncing the ovirt yum repo?

2017-05-04 Thread Rob Sterenborg
> -Original Message-
> From: Michael Mraka [mailto:michael.mr...@redhat.com]
> Sent: donderdag 4 mei 2017 10:18
> To: spacewalk-list@redhat.com
> Cc: Rob Sterenborg 
> Subject: Re: [Spacewalk-list] Syncing the ovirt yum repo?
> 
> Steve Meier:
> > Hi Rob,
> >
> > that's right. The repodata directory is mandatory and not present
> for
> > each architecture, which I believe it should be.
> >
> > In this case your best bet maybe to use something like wget to
> > fetch all the RPMs from that directory and then run rhnpush to
> > put them into your Spacewalk channel.
> 
> You can also set a filter for the repository.
> Go to Channels > Manages Software Channels > Manage Repositories,
> click on the repository name and set Filter to '*.x86_64'.
> This should limit your repository to download x86_64 packagges only.

Ah.. Thanks for pointing that out!


--
Rob


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


[Spacewalk-list] Syncing the ovirt yum repo?

2017-05-02 Thread Rob Sterenborg
Hi,

We're running Spacewalk 2.6 and we have a channel that syncs the ovirt-4.0 yum 
repo.


I've just removed all packages, done a "spacewalk-data-fsck -r" and resynced 
the channel.
In /var/log/rhn/reposync/centos-7-ovirt-4-x64.log I see:

2017/05/02 13:19:42 +02:00 Command: ['/usr/bin/spacewalk-repo-sync', 
'--channel', 'centos-7-ovirt-4-x64', '--type', 'yum']
2017/05/02 13:19:42 +02:00 Sync of channel started.
2017/05/02 13:19:43 +02:00 Repo URL: 
http://ftp.nluug.nl/os/Linux/virtual/ovirt/ovirt-4.0/rpm/el7/
2017/05/02 13:19:43 +02:00 Packages in repo:   908
2017/05/02 13:19:45 +02:00 Packages already synced:  0
2017/05/02 13:19:45 +02:00 Packages to sync:   899
2017/05/02 13:19:45 +02:00 1/899 : 
cockpit-ovirt-dashboard-0.10.6-1.4.2.el7.centos-0.noarch
2017/05/02 13:19:47 +02:00 2/899 : 
cockpit-ovirt-dashboard-0.10.6-1.3.4.el7.centos-0.noarch
[...snip...]
2017/05/02 13:57:10 +02:00 898/899 : vm-dump-metrics-devel-0.5-7.el7-0.x86_64
2017/05/02 13:57:11 +02:00 899/899 : vm-dump-metrics-devel-0.5-11.el7-0.x86_64
2017/05/02 13:57:11 +02:00 Linking packages to channel.
2017/05/02 13:57:11 +02:00 Sync of channel completed in 0:37:28.

In /var/log/rhn/rhn_taskomatic_daemon.log I see:

INFO   | jvm 1| 2017/05/02 13:58:00 | 2017-05-02 13:58:00,036 
[Thread-247032] INFO  com.redhat.rhn.taskomatic.task.repomd.RepositoryWriter - 
File Modified Date:2017-05-02 10:19:32 CEST
INFO   | jvm 1| 2017/05/02 13:58:00 | 2017-05-02 13:58:00,036 
[Thread-247032] INFO  com.redhat.rhn.taskomatic.task.repomd.RepositoryWriter - 
Channel Modified Date:2017-05-02 13:19:42 CEST
INFO   | jvm 1| 2017/05/02 13:58:00 | 2017-05-02 13:58:00,117 
[Thread-247032] INFO  com.redhat.rhn.taskomatic.task.repomd.RepositoryWriter - 
Generating new repository metadata for channel 'centos-7-ovirt-4-x64'(sha256) 0 
packages, 0 errata
INFO   | jvm 1| 2017/05/02 13:58:00 | 2017-05-02 13:58:00,135 
[Thread-247032] INFO  com.redhat.rhn.taskomatic.task.repomd.RepositoryWriter - 
Repository metadata generation for 'centos-7-ovirt-4-x64' finished in 0 seconds

However, all of its packages are listed as "Packages in no channels".

I found this post:
https://www.redhat.com/archives/spacewalk-list/2014-November/msg00268.html
But looking at the logs I think the sync is fully completed (?).

In /var/log/rhn/tasko/org2/repo-sync-bunch/repo-sync_8415957_err I see:

2017-05-02 13:57:12,065 [Thread-246575] ERROR 
com.redhat.rhn.taskomatic.task.RepoSyncTask  - 13:57:11 ERROR: Package arch 
ppc64 incompatible with channel centos-7-ovirt-4-x64

On this error I found the following:
https://www.redhat.com/archives/spacewalk-list/2014-August/msg00057.html
And this post describes what I'm seeing.


Can anyone enlighten me how to properly sync the ovirt yum repo?


Thanks,
Rob


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


Re: [Spacewalk-list] jpackage.org?

2017-03-03 Thread Rob Sterenborg
Hi,

I’ve used this repo file to install jpackage:

==
[jpackage-generic]
name=JPackage generic
#baseurl=http://mirrors.dotsrc.org/pub/jpackage/5.0/generic/free/
mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=5.0
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
==


My DNS shows this:

# dig +short jpackage.org ns
ns3.zarb.org.
# dig +short www.jpackage.org @ns3.zarb.org
jpackage.org.
51.15.1.41

The mirrorlist currently shows this:

# No local mirror detected - defaulting to adding them all
ftp://jpackage.hmdc.harvard.edu/JPackage/5.0/generic/free
http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/jpackage/5.0/generic/free
http://ftp.heanet.ie/pub/jpackage/5.0/generic/free
ftp://ftp.pbone.net/pub/jpackage/5.0/generic/free
http://mirror.ibcp.fr/pub/jpackage/5.0/generic/free
http://sunsite.rediris.es/mirror/jpackage/5.0/generic/free
ftp://gsa10.eps.cdf.udc.es/jpackage/5.0/generic/free
http://mirrors.dotsrc.org/jpackage/5.0/generic/free

Hope this helps.


--
Rob



-Original Message-
From: spacewalk-list-boun...@redhat.com 
[mailto:spacewalk-list-boun...@redhat.com] On Behalf Of Michael Mraka
Sent: vrijdag 3 maart 2017 09:25
To: spacewalk-list@redhat.com
Subject: Re: [Spacewalk-list] jpackage.org?

Kalchik, Jeffery:
> I'm finally getting around to running the 2.5->2.6 upgrade here this 
> afternoon and discovering that the JPackage repo 
> (www.jpackage.org) is apparently unavailable.  Not 
> only that, but so are the 3 name servers the whois registration points to 
> (ns[012].zarb.org.) I'm also not sure if http://www.zarb.org looks much like 
> I'd expect.
> 
> Or am I wildly hallucinating?

Hi Jeffery,

Yep, jpackage.org is completely down including dns.
There are basically 2 solutions/workarounds:
a) edit your jpackage-generic.repo file and comment out mirrorlist and
uncomment baseurl (see updated instructions on
https://github.com/spacewalkproject/spacewalk/wiki/HowToInstall#additional-repos--packages),
b) we've also created last resort backup on 
http://yum.spacewalkproject.org/jpackage/
(use it as basurl in your jpackage-generic.repo file).
 
> Jeff Kalchik
> Systems Engineering
> Land O'Lakes

Regards,

--
Michael Mráka
System Management Engineering, Red Hat

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

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

Re: [Spacewalk-list] Spacewalk, PostgreSQL 9.6, SQL reserved words

2017-02-23 Thread Rob Sterenborg
Right, I didn't find that but it should do the trick I guess.


--
Thanks,
Rob




From: spacewalk-list-boun...@redhat.com 
[mailto:spacewalk-list-boun...@redhat.com] On Behalf Of Andreas Dijkman
Sent: donderdag 23 februari 2017 16:41
To: spacewalk-list@redhat.com
Subject: Re: [Spacewalk-list] Spacewalk, PostgreSQL 9.6, SQL reserved words

Or you could fix the query as stated in this PR on GitHub: 
https://github.com/spacewalkproject/spacewalk/pull/465  

This adds PostgreSQL 9.6-support.

Met vriendelijke groet,

Andreas Dijkman
http://www.cygnis.nl/ | Stationsweg 3B | 9726 AC Groningen

On 23 Feb 2017, at 14:32, Ree, Jan-Albert van <mailto:j.a.v@marin.nl> wrote:

Just use the stock CentOS7 PostgreSQL 9.2 , which works flawless out of the box.

And as a tip : also use the same PostgreSQL database for your jabberd database, 
this for us has finally completely fixed all OSAD problems.
Been running over a month without any machine losing connection through OSAD.
--
Jan-Albert



Jan-Albert van Ree  | Linux System Administrator | MARIN Support Group
MARIN | T +31 317 49 35 48 | mailto:j.a.v@marin.nl | http://www.marin.nl

MARIN news: 
http://www.marin.nl/web/News/News-items/Few-places-left-for-Offshore-and-Ship-hydrodynamics-courses.htm


From: mailto:spacewalk-list-boun...@redhat.com 
<mailto:spacewalk-list-boun...@redhat.com> on behalf of Rob Sterenborg 
<mailto:r.sterenb...@netmatch.nl>
Sent: Thursday, February 23, 2017 14:14
To: mailto:spacewalk-list@redhat.com
Subject: [Spacewalk-list] Spacewalk, PostgreSQL 9.6, SQL reserved words

Hi,

We currently use Spacewalk 2.2 with PostgreSQL 8.4 on CentOS 6 and we have 
problems with it (TRACEBACK emails), so I want to replace these old servers. 
I'm now setting up Spacewalk 2.6 with PostgreSQL 9.6 on CentOS 7.

Installing and importing the database seems to have worked, however..

Now I get a different "TRACEBACK" error email from Spacewalk, and my eye fell 
on this:
==
Extra information about this error:
SQL Error generated: ('ERROR:  syntax error at or near "method"\nLINE 3: ...    
sa.remaining_tries, at.label method,\n  
  ^\n', , '\n    
select sa.action_id id, a.version,\n   
sa.remaining_tries, at.label method,\n   
at.unlocked_only,\n   a.prerequisite\n  
from rhnServerAction sa,\n   rhnAction a,\n 
  rhnActionType at\n where sa.server_id = 
%(server_id)s\n   and sa.action_id = a.id\n 
  and a.action_type = at.id\n   and sa.status in (0, 1) 
-- Queued or picked up\n   and a.earliest_action <= curren
t_timest
amp -- Check earliest_action\n   and not exists (\n 
  select 1\n from rhnServerAction 
sap\n    where sap.server_id = %(server_id)s\n  
and sap.action_id = a.prerequisite\n    
  and sap.status != 2 -- completed\n   )\n  
order by a.earliest_action, a.prerequisite nulls first, a.id\n    ')
==

Searching for this error I found these:
http://git.net/ml/spacewalk-devel/2016-11/msg4.html
https://github.com/spacewalkproject/spacewalk/blob/master/backend/server/handlers/xmlrpc/queue.py

In /usr/share/rhn/server/handlers/xmlrpc/queue.py, "def 
_future_actions_enabled(self):" reads from line 229:
==
   _query_queue_future = rhnSQL.Statement("""
   select sa.action_id id, a.version,
  sa.remaining_tries, at.label method,
  at.unlocked_only,
  a.prerequisite
 from rhnServerAction sa,
  rhnAction a,
  rhnActionType at
where sa.server_id = :server_id
  and sa.action_id = a.id
  and a.action_type = at.id
  and sa.status in (0, 1) -- Queued or picked up
  and a.earliest_action <= current_timestamp + 
numtodsinterval(:time_window * 3600, 'second')  -- Check earliest_action
  and at.label in ('packages.update', 'errata.update',
   'packages.runTransaction', 'packages.fullUpdate')
 order by a.earliest_action, a.prerequisite nulls first, 
a.id
   """)
==

I tried this query manually and it failed on "at" and "method". Both look like 
reserved words to me (my SQL editor a

[Spacewalk-list] Spacewalk, PostgreSQL 9.6, SQL reserved words

2017-02-23 Thread Rob Sterenborg
Hi,

We currently use Spacewalk 2.2 with PostgreSQL 8.4 on CentOS 6 and we have 
problems with it (TRACEBACK emails), so I want to replace these old servers. 
I'm now setting up Spacewalk 2.6 with PostgreSQL 9.6 on CentOS 7.

Installing and importing the database seems to have worked, however..

Now I get a different "TRACEBACK" error email from Spacewalk, and my eye fell 
on this:
==
Extra information about this error:
SQL Error generated: ('ERROR:  syntax error at or near "method"\nLINE 3: ...
sa.remaining_tries, at.label method,\n  
  ^\n', , '\n
select sa.action_id id, a.version,\n   
sa.remaining_tries, at.label method,\n   
at.unlocked_only,\n   a.prerequisite\n  
from rhnServerAction sa,\n   rhnAction a,\n 
  rhnActionType at\n where sa.server_id = 
%(server_id)s\n   and sa.action_id = a.id\n 
  and a.action_type = at.id\n   and sa.status in (0, 1) 
-- Queued or picked up\n   and a.earliest_action <= curren
 t_timest
 amp -- Check earliest_action\n   and not exists (\n
   select 1\n from rhnServerAction 
sap\nwhere sap.server_id = %(server_id)s\n  
and sap.action_id = a.prerequisite\n
  and sap.status != 2 -- completed\n   )\n  
order by a.earliest_action, a.prerequisite nulls first, a.id\n')
==

Searching for this error I found these:
http://git.net/ml/spacewalk-devel/2016-11/msg4.html
https://github.com/spacewalkproject/spacewalk/blob/master/backend/server/handlers/xmlrpc/queue.py

In /usr/share/rhn/server/handlers/xmlrpc/queue.py, "def 
_future_actions_enabled(self):" reads from line 229:
==
_query_queue_future = rhnSQL.Statement("""
select sa.action_id id, a.version,
   sa.remaining_tries, at.label method,
   at.unlocked_only,
   a.prerequisite
  from rhnServerAction sa,
   rhnAction a,
   rhnActionType at
 where sa.server_id = :server_id
   and sa.action_id = a.id
   and a.action_type = at.id
   and sa.status in (0, 1) -- Queued or picked up
   and a.earliest_action <= current_timestamp + 
numtodsinterval(:time_window * 3600, 'second')  -- Check earliest_action
   and at.label in ('packages.update', 'errata.update',
'packages.runTransaction', 'packages.fullUpdate')
  order by a.earliest_action, a.prerequisite nulls first, 
a.id
""")
==

I tried this query manually and it failed on "at" and "method". Both look like 
reserved words to me (my SQL editor agrees in this), and when I replace those 
with "atype" and "method1" the query works.

Of course this is not *the* solution, because my Python-fu isn't that great and 
I haven't looked where this "method" is being used. However, I do think that 
this needs to be fixed.

When I read about installing Spacewalk[1] I found that I can use PostgreSQL > 
8.4, so I thought 9.6 should be fine. Now I'm not so sure anymore. Do I need to 
downgrade PostgreSQL for this to work, and if yes, to which version?


[1] https://fedorahosted.org/spacewalk/wiki/PostgreSQLServerSetup


--
Thanks,
Rob


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