Re: [Spacewalk-list] postgresql db move issues

2016-02-12 Thread Ian Forde
Found the issue.  Because these are VMs, I had the DB on a separate disk
and moved the DB disk over to the new instance (spacewalk-db1).  Turns out
that the db user needed to have superuser privs in the DB to make it work.
So, one "ALTER USER spacewalkuser with SUPERUSER;" later...

I believe this also could have been postgresql ACL-related, but I didn't
want to dive too deeply into that as... scary. ;)

 -I

On Fri, Feb 12, 2016 at 12:23 PM, Ian Forde  wrote:

> (After setting up a few Spacewalk instances over the years, I've run into
> one of those... seemingly truly weird issues.  Hopefully this is an easy
> one...)
>
> I've got a spacewalk server named spacewalk1 (version 2.4) that had the
> postgresql DB on it.  I recently moved the DB over to another host, and
> updated /etc/rhn/rhn.conf on the Spacewalk server to point to it.
>
> Things seemed to work, and then...
>
> a) I started seeing some newly-registered hosts try to do a
> 'rhn-profile-sync' and fail with the following:
>
> Updating package profile...
>
> Updating package profile
>
> D: rpcServer: Calling XMLRPC registration.welcome_message
>
> D: rpcServer: Calling XMLRPC registration.update_packages
>
> A protocol error occurred: Internal Server Error , attempt #1,
>
> An error has occurred:
>
> rhn-plugin: Error communicating with server. The message was:
>
> Internal Server Error
>
> See /var/log/up2date for more information
>
>
> Looking on the db server at postgresql-Fri.log (since today is Friday) I
> see the following:
>
> 2016-02-12 14:15:13.479 CST ERROR:  current transaction is aborted,
> commands ignored until end of transaction block
>
> 2016-02-12 14:15:13.479 CST STATEMENT:  SELECT queue_server(111758, 0)
>
> 2016-02-12 14:15:17.492 CST ERROR:  password is required
>
> 2016-02-12 14:15:17.492 CST DETAIL:  Non-superusers must provide a
> password in the connection string.
>
> 2016-02-12 14:15:17.492 CST CONTEXT:  SQL statement "SELECT
> dblink_connect('at_conn', 'dbname=' || current_database() || ' port=' ||
> coalesce(inet_server_port(), '5432'))"
>
> PL/pgSQL function "pg_dblink_exec" line 5 at PERFORM
>
> SQL statement "SELECT  pg_dblink_exec( 'insert into rhnPackageEVR(id,
> epoch, version, release, evr) values (' ||  $1  || ', ' ||  $2  || ', ' ||
> $3  || ', ' ||  $4  || ', evr_t(' ||  $2  || ', ' ||  $3  || ', ' ||  $4
> || '))' )"
>
> PL/pgSQL function "lookup_evr" line 18 at PERFORM
>
> 2016-02-12 14:15:17.492 CST STATEMENT:
>
> insert into rhnServerPackage
>
> (server_id, name_id, evr_id, package_arch_id, installtime)
>
> values (111758, LOOKUP_PACKAGE_NAME(E'druid'),
> LOOKUP_EVR(NULL, E'0.8.3', E'0.1'),
>
> LOOKUP_PACKAGE_ARCH(E'noarch'), TO_TIMESTAMP(E'2016-02-11
> 15:12:08', '-MM-DD HH24:MI:SS')
>
> )
>
>
>
> 2016-02-12 14:15:17.495 CST ERROR:  current transaction is aborted,
> commands ignored until end of transaction block
>
> 2016-02-12 14:15:17.495 CST STATEMENT:  SELECT queue_server(111758, 0)
>
> b) I'm now seeing the following in the repo sync logs on the spacewalk
> server (/var/log/rhn/reposync/)
>
> [root@spacewalk1 reposync]# tail rhel7-x86_64-ulyaoth.log
>
> Repo URL: https://repos.ulyaoth.net/RHEL/7/x86_64/os/
>
> Packages in repo:   436
>
> Packages already synced:435
>
> Packages to sync: 1
>
> 1/1 : ulyaoth-nginx-mainline-1.9.11-1.el7-1.x86_64
>
> (9, 'ERROR:  password is required', 'DETAIL:  Non-superusers must
> provide a password in the connection string.\nCONTEXT:  SQL statement
> "SELECT  dblink_connect(\'at_conn\', \'dbname=\' || current_database() ||
> \' port=\' || coalesce(inet_server_port(), \'5432\'))"\nPL/pgSQL function
> "pg_dblink_exec" line 5 at PERFORM\nSQL statement "SELECT  pg_dblink_exec(
> \'insert into rhnPackageEVR(id, epoch, version, release, evr) values (\'
> ||  $1  || \', \' ||  $2  || \', \' ||  $3  || \', \' ||  $4  || \',
> evr_t(\' ||  $2  || \', \' ||  $3  || \', \' ||  $4  || \'))\' )"\nPL/pgSQL
> function "lookup_evr" line 18 at PERFORM\n', InternalError('password is
> required\nDETAIL:  Non-superusers must provide a password in the connection
> string.\nCONTEXT:  SQL statement "SELECT  dblink_connect(\'at_conn\',
> \'dbname=\' || current_database() || \' port=\' ||
> coalesce(inet_server_port(), \'5432\'))"\nPL/pgSQL function
> "pg_dblink_exec" line 5 at PERFORM\nSQL statement "SELECT  pg_dblink_exec(
> \'insert into rhnPackageEVR(id, epoch, version, release, evr) values (\'
> ||  $1  || \', \' ||  $2  || \', \' ||  $3  || \', \' ||  $4  || \',
> evr_t(\' ||  $2  || \', \' ||  $3  || \', \' ||  $4  || \'))\' )"\nPL/pgSQL
> function "lookup_evr" line 18 at PERFORM\n',))
>
> Linking packages to channel.
>
> Repo https://repos.ulyaoth.net/RHEL/7/x86_64/os/ has 0 errata.
>
> Sync completed.
>
> Total time: 0:01:38
>
> [root@spacewalk1 reposync]#
>
> It seems like something didn't get updated to tell Spacewalk to use the
> remote dbusername and password,

[Spacewalk-list] Yum update error

2016-02-12 Thread Roger Hirata
Hello,

im trying to do an update on a server using spacewalk client.

Error Downloading Packages:
  wget-1.12-8.el6.x86_64: failed to retrieve
getPackage/wget-1.12-8.el6.x86_64.rpm from centos66_x86_64
error was [Errno 14] PYCURL ERROR 22 - "The requested URL returned error:
404 Not Found"

But it always return this message on spacewalk server rhn_server_xmlrpc.log:

2016/02/12 19:30:49 -02:00 19832 10.64.212.57:
server/rhnPackage.check_package_file('ERROR', 'Package not found',
'/var/satellite/redhat/1/f52/wget/1.12-8.el6/x86_64/f52a59e21b1f4f3eaa11e4aa591412c94c7e1b82d1e273bc80779459a0f9b8b2/wget-1.12-8.el6.x86_64.rpm')

This is the uniq evidence that i found in logs, and the file already exists:
-rw-r--r-- 1 apache apache 495168 Jan 13 12:11
/var/satellite/redhat/1/f52/wget/1.12-8.el6/x86_64/f52a59e21b1f4f3eaa11e4aa591412c94c7e1b82d1e273bc80779459a0f9b8b2/wget-1.12-8.el6.x86_64.rpm

Please, can u help me?

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

Re: [Spacewalk-list] Upgrading clients to 2.4

2016-02-12 Thread Dimitri Yioulos
Is it against a security policy or firewall rule to simply do “rpm –import 
http://spacewalk.redhat.com/yum/RPM-GPG-KEY-spacewalk-2015”?


From: spacewalk-list-boun...@redhat.com 
[mailto:spacewalk-list-boun...@redhat.com] On Behalf Of Ian Forde
Sent: Friday, February 12, 2016 3:46 PM
To: spacewalk-list@redhat.com
Subject: Re: [Spacewalk-list] Upgrading clients to 2.4

You could always use SSM to execute remote commands on your hosts, (consisting 
of a curl/wget to download key to their local filesystems and import the 
keys...) Then you should be able to upgrade the packages.

On Fri, Feb 12, 2016 at 12:37 PM, Matt Bayliss 
mailto:aarrgghh...@gmail.com>> wrote:
OK, so I pushed out the package rhncfg-actions so I could run remote commands.  
I figured I could set up a configuration channel to push out the gpg key and 
then use a remote command to install it.  I found that I could not use 
configuration channels or use remote commands until I logged onto each server 
and enabled the functionality with 'rhn-actions-control --enable-all' (why is 
this not on by default?!).
Anyway, I've finally jumped through enough hoops to run the 'gpg --import 
RPM-GPG-KEY-spacewalk-2015' command, problem is though is that the 2.4-client 
packages still won't install and I'm getting the same "Error while executing 
packages action: Public key for rhn-setup-2.4.11-1.el6.noarch.rpm is not 
installed [[6]]"

GPG keys on my system are:
# rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n'

gpg-pubkey-c105b9de-4e0fd3a3 --> gpg(CentOS-6 Key (CentOS 6 Official Signing 
Key) mailto:centos-6-...@centos.org>>)
gpg-pubkey-863a853d-4f55f54d --> gpg(Spacewalk 
mailto:spacewalk-de...@redhat.com>>)
gpg-pubkey-0608b895-4bd22942 --> gpg(EPEL (6) 
mailto:e...@fedoraproject.org>>)
It seems that the key has not been imported properly.  I'll check the file I 
pushed out again.

# gpg --with-fingerprint RPM-GPG-KEY-spacewalk-2015
pub  1024D/B8002DE1 2015-04-17 Spacewalk 
mailto:spacewalk-de...@redhat.com>>
  Key fingerprint = A5FC 508C DD3C C46D 3C3B  4612 DCC9 81CD B800 2DE1
OK, so that looks right,. I'll try and import it again..

# gpg --import RPM-GPG-KEY-spacewalk-2015
gpg: key B8002DE1: "Spacewalk 
mailto:spacewalk-de...@redhat.com>>" not changed
gpg: Total number processed: 1
gpg:  unchanged: 1
It's processed and unchanged but it's still not in my list:

# rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n'
gpg-pubkey-c105b9de-4e0fd3a3 --> gpg(CentOS-6 Key (CentOS 6 Official Signing 
Key) mailto:centos-6-...@centos.org>>)
gpg-pubkey-863a853d-4f55f54d --> gpg(Spacewalk 
mailto:spacewalk-de...@redhat.com>>)
gpg-pubkey-0608b895-4bd22942 --> gpg(EPEL (6) 
mailto:e...@fedoraproject.org>>)
wtf?  Why won't the key import/update?

On 12 February 2016 at 15:18, Dimitri Yioulos 
mailto:dyiou...@netatlantic.com>> wrote:
Matt,

I think you can use Manage|Provisioning|Run remote commands against a group of 
servers.  If you use Ansible in your environment, I have a simple playbooks to 
accomplish installing the public key which I’m happy to share with you.

Dimitri

From: 
spacewalk-list-boun...@redhat.com 
[mailto:spacewalk-list-boun...@redhat.com]
 On Behalf Of Matt Bayliss
Sent: Friday, February 12, 2016 9:41 AM
To: spacewalk-list@redhat.com
Subject: [Spacewalk-list] Upgrading clients to 2.4

I'm trying to bring a bunch of Spacewalk clients which are currently using the 
2.2-client version, up to 2.4-client.
I created a new channel & repo and used the SSM to transfer systems over to the 
new channel.  The updates then appeaar as available and I scheduled the upgrade.
The problem is that I receive the error "Error while executing packages action: 
Public key for rhn-setup-2.4.11-1.el6.noarch.rpm is not installed [[6]]" as the 
2015 key is not installed by my clients.
What's the best way to fix this using Spacewalk, I'd rather avoid having to 
import the key manually on each system.
Thanks,
Matt

___
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] Upgrading clients to 2.4

2016-02-12 Thread Ian Forde
You could always use SSM to execute remote commands on your hosts,
(consisting of a curl/wget to download key to their local filesystems and
import the keys...) Then you should be able to upgrade the packages.

On Fri, Feb 12, 2016 at 12:37 PM, Matt Bayliss 
wrote:

> OK, so I pushed out the package rhncfg-actions so I could run remote
> commands.  I figured I could set up a configuration channel to push out the
> gpg key and then use a remote command to install it.  I found that I could
> not use configuration channels or use remote commands until I logged onto
> each server and enabled the functionality with 'rhn-actions-control
> --enable-all' (why is this not on by default?!).
>
> Anyway, I've finally jumped through enough hoops to run the 'gpg --import
> RPM-GPG-KEY-spacewalk-2015' command, problem is though is that the
> 2.4-client packages still won't install and I'm getting the same "Error
> while executing packages action: Public key for
> rhn-setup-2.4.11-1.el6.noarch.rpm is not installed [[6]]"
>
> GPG keys on my system are:
> # rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n'
>
> gpg-pubkey-c105b9de-4e0fd3a3 --> gpg(CentOS-6 Key (CentOS 6 Official
> Signing Key) )
> gpg-pubkey-863a853d-4f55f54d --> gpg(Spacewalk  >)
> gpg-pubkey-0608b895-4bd22942 --> gpg(EPEL (6) )
>
> It seems that the key has not been imported properly.  I'll check the file
> I pushed out again.
>
> # gpg --with-fingerprint RPM-GPG-KEY-spacewalk-2015
> pub  1024D/B8002DE1 2015-04-17 Spacewalk 
>   Key fingerprint = A5FC 508C DD3C C46D 3C3B  4612 DCC9 81CD B800 2DE1
>
> OK, so that looks right,. I'll try and import it again..
>
> # gpg --import RPM-GPG-KEY-spacewalk-2015
> gpg: key B8002DE1: "Spacewalk " not changed
> gpg: Total number processed: 1
> gpg:  unchanged: 1
>
> It's processed and unchanged but it's still not in my list:
>
> # rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n'
> gpg-pubkey-c105b9de-4e0fd3a3 --> gpg(CentOS-6 Key (CentOS 6 Official
> Signing Key) )
> gpg-pubkey-863a853d-4f55f54d --> gpg(Spacewalk  >)
> gpg-pubkey-0608b895-4bd22942 --> gpg(EPEL (6) )
>
> wtf?  Why won't the key import/update?
>
> On 12 February 2016 at 15:18, Dimitri Yioulos 
> wrote:
>
>> Matt,
>>
>>
>>
>> I think you can use Manage|Provisioning|Run remote commands against a
>> group of servers.  If you use Ansible in your environment, I have a simple
>> playbooks to accomplish installing the public key which I’m happy to share
>> with you.
>>
>>
>>
>> Dimitri
>>
>>
>>
>> *From:* spacewalk-list-boun...@redhat.com [mailto:
>> spacewalk-list-boun...@redhat.com] *On Behalf Of *Matt Bayliss
>> *Sent:* Friday, February 12, 2016 9:41 AM
>> *To:* spacewalk-list@redhat.com
>> *Subject:* [Spacewalk-list] Upgrading clients to 2.4
>>
>>
>>
>> I'm trying to bring a bunch of Spacewalk clients which are currently
>> using the 2.2-client version, up to 2.4-client.
>>
>> I created a new channel & repo and used the SSM to transfer systems over
>> to the new channel.  The updates then appeaar as available and I scheduled
>> the upgrade.
>>
>> The problem is that I receive the error "Error while executing packages
>> action: Public key for rhn-setup-2.4.11-1.el6.noarch.rpm is not installed
>> [[6]]" as the 2015 key is not installed by my clients.
>>
>> What's the best way to fix this using Spacewalk, I'd rather avoid having
>> to import the key manually on each system.
>>
>> Thanks,
>>
>> Matt
>>
>> ___
>> 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] Upgrading clients to 2.4

2016-02-12 Thread Matt Bayliss
OK, so I pushed out the package rhncfg-actions so I could run remote
commands.  I figured I could set up a configuration channel to push out the
gpg key and then use a remote command to install it.  I found that I could
not use configuration channels or use remote commands until I logged onto
each server and enabled the functionality with 'rhn-actions-control
--enable-all' (why is this not on by default?!).

Anyway, I've finally jumped through enough hoops to run the 'gpg --import
RPM-GPG-KEY-spacewalk-2015' command, problem is though is that the
2.4-client packages still won't install and I'm getting the same "Error
while executing packages action: Public key for
rhn-setup-2.4.11-1.el6.noarch.rpm is not installed [[6]]"

GPG keys on my system are:
# rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n'

gpg-pubkey-c105b9de-4e0fd3a3 --> gpg(CentOS-6 Key (CentOS 6 Official
Signing Key) )
gpg-pubkey-863a853d-4f55f54d --> gpg(Spacewalk )
gpg-pubkey-0608b895-4bd22942 --> gpg(EPEL (6) )

It seems that the key has not been imported properly.  I'll check the file
I pushed out again.

# gpg --with-fingerprint RPM-GPG-KEY-spacewalk-2015
pub  1024D/B8002DE1 2015-04-17 Spacewalk 
  Key fingerprint = A5FC 508C DD3C C46D 3C3B  4612 DCC9 81CD B800 2DE1

OK, so that looks right,. I'll try and import it again..

# gpg --import RPM-GPG-KEY-spacewalk-2015
gpg: key B8002DE1: "Spacewalk " not changed
gpg: Total number processed: 1
gpg:  unchanged: 1

It's processed and unchanged but it's still not in my list:

# rpm -q gpg-pubkey --qf '%{name}-%{version}-%{release} --> %{summary}\n'
gpg-pubkey-c105b9de-4e0fd3a3 --> gpg(CentOS-6 Key (CentOS 6 Official
Signing Key) )
gpg-pubkey-863a853d-4f55f54d --> gpg(Spacewalk )
gpg-pubkey-0608b895-4bd22942 --> gpg(EPEL (6) )

wtf?  Why won't the key import/update?

On 12 February 2016 at 15:18, Dimitri Yioulos 
wrote:

> Matt,
>
>
>
> I think you can use Manage|Provisioning|Run remote commands against a
> group of servers.  If you use Ansible in your environment, I have a simple
> playbooks to accomplish installing the public key which I’m happy to share
> with you.
>
>
>
> Dimitri
>
>
>
> *From:* spacewalk-list-boun...@redhat.com [mailto:
> spacewalk-list-boun...@redhat.com] *On Behalf Of *Matt Bayliss
> *Sent:* Friday, February 12, 2016 9:41 AM
> *To:* spacewalk-list@redhat.com
> *Subject:* [Spacewalk-list] Upgrading clients to 2.4
>
>
>
> I'm trying to bring a bunch of Spacewalk clients which are currently using
> the 2.2-client version, up to 2.4-client.
>
> I created a new channel & repo and used the SSM to transfer systems over
> to the new channel.  The updates then appeaar as available and I scheduled
> the upgrade.
>
> The problem is that I receive the error "Error while executing packages
> action: Public key for rhn-setup-2.4.11-1.el6.noarch.rpm is not installed
> [[6]]" as the 2015 key is not installed by my clients.
>
> What's the best way to fix this using Spacewalk, I'd rather avoid having
> to import the key manually on each system.
>
> Thanks,
>
> Matt
>
> ___
> 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] postgresql db move issues

2016-02-12 Thread Ian Forde
(After setting up a few Spacewalk instances over the years, I've run into
one of those... seemingly truly weird issues.  Hopefully this is an easy
one...)

I've got a spacewalk server named spacewalk1 (version 2.4) that had the
postgresql DB on it.  I recently moved the DB over to another host, and
updated /etc/rhn/rhn.conf on the Spacewalk server to point to it.

Things seemed to work, and then...

a) I started seeing some newly-registered hosts try to do a
'rhn-profile-sync' and fail with the following:

Updating package profile...

Updating package profile

D: rpcServer: Calling XMLRPC registration.welcome_message

D: rpcServer: Calling XMLRPC registration.update_packages

A protocol error occurred: Internal Server Error , attempt #1,

An error has occurred:

rhn-plugin: Error communicating with server. The message was:

Internal Server Error

See /var/log/up2date for more information


Looking on the db server at postgresql-Fri.log (since today is Friday) I
see the following:

2016-02-12 14:15:13.479 CST ERROR:  current transaction is aborted,
commands ignored until end of transaction block

2016-02-12 14:15:13.479 CST STATEMENT:  SELECT queue_server(111758, 0)

2016-02-12 14:15:17.492 CST ERROR:  password is required

2016-02-12 14:15:17.492 CST DETAIL:  Non-superusers must provide a password
in the connection string.

2016-02-12 14:15:17.492 CST CONTEXT:  SQL statement "SELECT
dblink_connect('at_conn', 'dbname=' || current_database() || ' port=' ||
coalesce(inet_server_port(), '5432'))"

PL/pgSQL function "pg_dblink_exec" line 5 at PERFORM

SQL statement "SELECT  pg_dblink_exec( 'insert into rhnPackageEVR(id,
epoch, version, release, evr) values (' ||  $1  || ', ' ||  $2  || ', ' ||
$3  || ', ' ||  $4  || ', evr_t(' ||  $2  || ', ' ||  $3  || ', ' ||  $4
|| '))' )"

PL/pgSQL function "lookup_evr" line 18 at PERFORM

2016-02-12 14:15:17.492 CST STATEMENT:

insert into rhnServerPackage

(server_id, name_id, evr_id, package_arch_id, installtime)

values (111758, LOOKUP_PACKAGE_NAME(E'druid'),
LOOKUP_EVR(NULL, E'0.8.3', E'0.1'),

LOOKUP_PACKAGE_ARCH(E'noarch'), TO_TIMESTAMP(E'2016-02-11
15:12:08', '-MM-DD HH24:MI:SS')

)



2016-02-12 14:15:17.495 CST ERROR:  current transaction is aborted,
commands ignored until end of transaction block

2016-02-12 14:15:17.495 CST STATEMENT:  SELECT queue_server(111758, 0)

b) I'm now seeing the following in the repo sync logs on the spacewalk
server (/var/log/rhn/reposync/)

[root@spacewalk1 reposync]# tail rhel7-x86_64-ulyaoth.log

Repo URL: https://repos.ulyaoth.net/RHEL/7/x86_64/os/

Packages in repo:   436

Packages already synced:435

Packages to sync: 1

1/1 : ulyaoth-nginx-mainline-1.9.11-1.el7-1.x86_64

(9, 'ERROR:  password is required', 'DETAIL:  Non-superusers must
provide a password in the connection string.\nCONTEXT:  SQL statement
"SELECT  dblink_connect(\'at_conn\', \'dbname=\' || current_database() ||
\' port=\' || coalesce(inet_server_port(), \'5432\'))"\nPL/pgSQL function
"pg_dblink_exec" line 5 at PERFORM\nSQL statement "SELECT  pg_dblink_exec(
\'insert into rhnPackageEVR(id, epoch, version, release, evr) values (\'
||  $1  || \', \' ||  $2  || \', \' ||  $3  || \', \' ||  $4  || \',
evr_t(\' ||  $2  || \', \' ||  $3  || \', \' ||  $4  || \'))\' )"\nPL/pgSQL
function "lookup_evr" line 18 at PERFORM\n', InternalError('password is
required\nDETAIL:  Non-superusers must provide a password in the connection
string.\nCONTEXT:  SQL statement "SELECT  dblink_connect(\'at_conn\',
\'dbname=\' || current_database() || \' port=\' ||
coalesce(inet_server_port(), \'5432\'))"\nPL/pgSQL function
"pg_dblink_exec" line 5 at PERFORM\nSQL statement "SELECT  pg_dblink_exec(
\'insert into rhnPackageEVR(id, epoch, version, release, evr) values (\'
||  $1  || \', \' ||  $2  || \', \' ||  $3  || \', \' ||  $4  || \',
evr_t(\' ||  $2  || \', \' ||  $3  || \', \' ||  $4  || \'))\' )"\nPL/pgSQL
function "lookup_evr" line 18 at PERFORM\n',))

Linking packages to channel.

Repo https://repos.ulyaoth.net/RHEL/7/x86_64/os/ has 0 errata.

Sync completed.

Total time: 0:01:38

[root@spacewalk1 reposync]#

It seems like something didn't get updated to tell Spacewalk to use the
remote dbusername and password, even though it's hitting the database
server.

Any ideas what I'm missing?  Help!

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

Re: [Spacewalk-list] Spacewalk 2.4 Migrating from Oracle to PostgreSQL - need help

2016-02-12 Thread Murdoch, Steven


-Original Message-
From: spacewalk-list-boun...@redhat.com 
[mailto:spacewalk-list-boun...@redhat.com] On Behalf Of 
spacewalk-list-requ...@redhat.com
Sent: 12 February 2016 17:01
To: spacewalk-list@redhat.com
Subject: Spacewalk-list Digest, Vol 93, Issue 16

Send Spacewalk-list mailing list submissions to
spacewalk-list@redhat.com

To subscribe or unsubscribe via the World Wide Web, visit
https://www.redhat.com/mailman/listinfo/spacewalk-list
or, via email, send a message with subject or body 'help' to
spacewalk-list-requ...@redhat.com

You can reach the person managing the list at
spacewalk-list-ow...@redhat.com

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Spacewalk-list digest..."

--
This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, notify the sender immediately by return email and delete the message 
and any attachments from your system.

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


Re: [Spacewalk-list] Spacewalk 2.4 Migration from Oracle to Postgresql

2016-02-12 Thread Jan Dobes

On 12.2.2016 17:18 Murdoch, Steven wrote:

Can you Help?

I am using Spacewalk 2.4 with an Oracle DB.
I need to migrate from Oracle to PostgreSQL.

I have been following this link to migrate from Oracle to PostgreSQL:

https://fedorahosted.org/spacewalk/wiki/DatabaseMigrations

Got as far as trying to load my dump file into my new database, but I
get this error:
Running this command:

*# spacewalk-sql -i < migrate-to-postgresql.sql*

UPDATE 685

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ALTER TABLE

ERROR:  relation "rhn_command_queue_sessions" does not exist

#

Before the above error – I ran this, and this worked ok.
*# spacewalk-setup-postgresql create --db postgresql  --user postgresql
--password 
*….
#


I then ran this and this worked!
*# spacewalk-setup --db-only --external-postgresql*

** Database: Setting up database connection for PostgreSQL backend.

Hostname (leave empty for local)?

Database? postgresql

Username? postgresql

Password?

** Database: Populating database.

The Database has schema.  Would you like to clear the database [Y]? y

** Database: Clearing database.

** Database: Shutting down spacewalk services that may be using DB.

** Database: Services stopped.  Clearing DB.

** Database: Re-populating database.

*** Progress: #

* Configuring tomcat.

#

What do I have to do to get this:

*# spacewalk-sql -i < migrate-to-postgresql.sql*

…to work without the ERROR:  relation "rhn_command_queue_sessions" does
not exist ?

Thanks a lot.
Steve..




This message and any attachments are intended only for the use of the
addressee and may contain information that is privileged and
confidential. If the reader of the message is not the intended recipient
or an authorized representative of the intended recipient, you are
hereby notified that any dissemination of this communication is strictly
prohibited. If you have received this communication in error, notify the
sender immediately by return email and delete the message and any
attachments from your system.


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



Hello,

we know about this problem, as a workaround please drop table 
'rhn_command_queue_sessions' in Oracle database and create dump again or 
in existing dump file delete all operations with this table.


Regards,
--
Jan Dobes
Satellite Engineering, Red Hat

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


[Spacewalk-list] Spacewalk 2.4 Migration from Oracle to Postgresql

2016-02-12 Thread Murdoch, Steven
Can you Help?
I am using Spacewalk 2.4 with an Oracle DB.
I need to migrate from Oracle to PostgreSQL.

I have been following this link to migrate from Oracle to PostgreSQL:
https://fedorahosted.org/spacewalk/wiki/DatabaseMigrations

Got as far as trying to load my dump file into my new database, but I get this 
error:
Running this command:

# spacewalk-sql -i < migrate-to-postgresql.sql
UPDATE 685
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ERROR:  relation "rhn_command_queue_sessions" does not exist
#

Before the above error - I ran this, and this worked ok.
# spacewalk-setup-postgresql create --db postgresql  --user postgresql 
--password 

#

I then ran this and this worked!
# spacewalk-setup --db-only --external-postgresql
** Database: Setting up database connection for PostgreSQL backend.
Hostname (leave empty for local)?
Database? postgresql
Username? postgresql
Password?
** Database: Populating database.
The Database has schema.  Would you like to clear the database [Y]? y
** Database: Clearing database.
** Database: Shutting down spacewalk services that may be using DB.
** Database: Services stopped.  Clearing DB.
** Database: Re-populating database.
*** Progress: #
* Configuring tomcat.
#

What do I have to do to get this:
# spacewalk-sql -i < migrate-to-postgresql.sql
...to work without the ERROR:  relation "rhn_command_queue_sessions" does not 
exist ?

Thanks a lot.
Steve..



--
This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, notify the sender immediately by return email and delete the message 
and any attachments from your system.
___
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list

Re: [Spacewalk-list] Upgrading clients to 2.4

2016-02-12 Thread Dimitri Yioulos
Matt,

I think you can use Manage|Provisioning|Run remote commands against a group of 
servers.  If you use Ansible in your environment, I have a simple playbooks to 
accomplish installing the public key which I’m happy to share with you.

Dimitri

From: spacewalk-list-boun...@redhat.com 
[mailto:spacewalk-list-boun...@redhat.com] On Behalf Of Matt Bayliss
Sent: Friday, February 12, 2016 9:41 AM
To: spacewalk-list@redhat.com
Subject: [Spacewalk-list] Upgrading clients to 2.4

I'm trying to bring a bunch of Spacewalk clients which are currently using the 
2.2-client version, up to 2.4-client.
I created a new channel & repo and used the SSM to transfer systems over to the 
new channel.  The updates then appeaar as available and I scheduled the upgrade.
The problem is that I receive the error "Error while executing packages action: 
Public key for rhn-setup-2.4.11-1.el6.noarch.rpm is not installed [[6]]" as the 
2015 key is not installed by my clients.
What's the best way to fix this using Spacewalk, I'd rather avoid having to 
import the key manually on each system.
Thanks,
Matt
___
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list

Re: [Spacewalk-list] Client updates failing

2016-02-12 Thread Dimitri Yioulos


-Original Message-
From: Jan Hutař [mailto:jhu...@redhat.com] 
Sent: Friday, February 12, 2016 12:41 AM
To: spacewalk-list@redhat.com
Cc: Dimitri Yioulos 
Subject: Re: [Spacewalk-list] Client updates failing

On Thu, 11 Feb 2016 14:22:18 + Dimitri Yioulos  
wrote:

> 
> 
> -Original Message-
> From: Jan Hutař [mailto:jhu...@redhat.com]
> Sent: Thursday, February 11, 2016 1:31 AM
> To: spacewalk-list@redhat.com
> Cc: Dimitri Yioulos 
> Subject: Re: [Spacewalk-list] Client updates failing
> 
> On Mon, 8 Feb 2016 17:38:04 + Dimitri Yioulos 
>  wrote:
> 
> > Hello, all.
> > 
> > I have version 2.4 installed on a CentOS 6 box.  It was working 
> > great ... until now.  When I try to run an update, it ultimately 
> > fails.  The following appears in the client's Spacewalk Events 
> > History:  Client execution returned
> > "Requested packages already installed" (code 0.   I've tried
> > dropping the jabber db's, removing osad-auth.conf on the clients, 
> > etc., all with no joy.  Extensive research has turned up no 
> > solution.
> > 
> > Can anyone help?
> > 
> > Many thanks.
> 
> Hello
> 
> Please could you change if you are hitting:
> 
>   Bug 1302198 - remote package upgrade saying newer package is 
> installed, but it is not
> https://bugzilla.redhat.com/show_bug.cgi?id=1302198
> 
> ?
> 
> > Dimitri
> > 
> 
> Regards,
> Jan
> 
> 
> 
> -- 
> Jan Hutar Systems Management QA
> jhu...@redhat.com Red Hat, Inc.
> 
> 
> Hi, Jan.
> 
> Sorry, I don't understand what you're asking me to do.  Have I hit a 
> bug?  A fix in the works?  A work-around?  Because, right now, I have 
> a non-working Spacewalk.
> 
> Dimitri

I'm sorry, I have wrote "Please could you change if you are hitting:" but meant 
"Please could you check if you are hitting:". If I understood you correctly, 
you have issues with updating your clients right? You might be hitting linked 
bug.

Is your "non-working Spacewalk" a different issue?

Please keep me in CC.

Regards,
Jan



-- 
Jan Hutar Systems Management QA
jhu...@redhat.com Red Hat, Inc.


Jan,

I appear to be hitting at least a similar bug.  When I run "rhn_check -vv, I 
get a slightly different result:

 [root@bofi ~]# /usr/sbin/rhn_check -vv
D: do_call packages.checkNeedUpdate('rhnsd=1',){}
Loaded plugins: fastestmirror, rhnplugin
D: login(forceUpdate=False) invoked
D: readCachedLogin invoked
D: Checking pickled loginInfo, currentTime=1455286056.83, 
createTime=1455275977.21, expire-offset=3600.0
D: Pickled loginInfo has expired, created = 1455275977.21, expire = 
1455279577.21.
logging into up2date server
D: rpcServer: Calling XMLRPC up2date.login
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at 1455286056.85 with expiration of 1455289656.85 
seconds.
successfully retrieved authentication token from up2date server
D: logininfo:{'X-RHN-Server-Id': 110098, 'X-RHN-Auth-Server-Time': 
'1455286058.04', 'X-RHN-Auth': 'WPcBJp95xQnGWkJegZDD9RnvXc0i4k9eC9d3IxzdCqk=', 
'X-RHN-Auth-Channels': [['centos5-x86_64', '20150219163429', '1', '1'], 
['rpmforge-el5-x86_64', '2016021102', '0', '1'], ['puppet-el5-x86_64', 
'2016021110', '0', '1'], ['spacewalk-client-el5-x86_64', '201602', 
'0', '1'], ['centos5-updates-x86_64', '2016021107', '0', '1'], 
['centos5-base-x86_64', '2016021104', '0', '1'], ['epel5-x86_64', 
'2016021100', '0', '1']], 'X-RHN-Auth-User-Id': '', 
'X-RHN-Auth-Expire-Offset': '3600.0'}
D: rpcServer: Calling XMLRPC up2date.listChannels
This system is receiving updates from RHN Classic or Red Hat Satellite.
Loading mirror speeds from cached hostfile
 * base: cosmos.illinois.edu
 * epel: ftp.cse.buffalo.edu
 * extras: mirror.lug.udel.edu
 * updates: mirror.atlantic.net
Checking for new repos for mirrors
D: local action status: (0, 'rpm database not modified since last update (or 
package list recently updated)', {}) < NOTE THIS LINE
D: rpcServer: Calling XMLRPC registration.welcome_message

I've noted the line of interest.

>From the Spacewalk UI:

 Details: This action will be executed after 2/11/16 9:11:00 AM EST
This action's status is: Completed.
The client picked up this action on 2/11/16 9:57 AM
The client completed this action on 2/11/16 9:58 AM
Client execution returned "Requested packages already installed" (code 0)   
<- SAME AS REPORTED IN BUG

Packages Scheduled:
tzdata-2016a-1.el5.x86_64

Of course, a previous version of tzdata is installed on this machine.

Is our Spacewalk database out-of-whack?  I must confess that I run this script 
to clean up obsolete packages: 
https://www.redhat.com/archives/spacewalk-list/2012-August/msg00249.html  Might 
that be the cause?  If so, how do I remediate?

Dimitri

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

[Spacewalk-list] Upgrading clients to 2.4

2016-02-12 Thread Matt Bayliss
I'm trying to bring a bunch of Spacewalk clients which are currently using
the 2.2-client version, up to 2.4-client.

I created a new channel & repo and used the SSM to transfer systems over to
the new channel.  The updates then appeaar as available and I scheduled the
upgrade.

The problem is that I receive the error "Error while executing packages
action: Public key for rhn-setup-2.4.11-1.el6.noarch.rpm is not installed
[[6]]" as the 2015 key is not installed by my clients.

What's the best way to fix this using Spacewalk, I'd rather avoid having to
import the key manually on each system.

Thanks,

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