Re: [Spacewalk-list] Changing the functionality of the Daily Status Report

2019-09-02 Thread Ananta Chakravartula
I have something like this in cron

https://github.com/ac427/my_cm/blob/master/python_scripts/spacewalk_inactive.py

ac

On Wed, Aug 28, 2019 at 11:38 AM Guy Matz  wrote:

> Hi!  I get a daily email of machines that have not checked in, but what I
> would prefer is for spacewalk to fire a webhook . . .  is that possible?
>
> Thanks!
> Guy
> ___
> 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] questions about spacecmd and rhnreg_ks

2019-08-13 Thread Ananta Chakravartula
I created groups dev/stage/prod and assigned nodes to those groups
depending on our chef client environment.

My questions

1) whenever I run `rhnreg_ks` on clients, i want to run a script on the
server to add the node to a certain group and  set basechannel depending on
the environment. for example I want all the prod nodes to be set to base
channel prod-xxx. I wrote some code for that, but how can i trigger it on
rhnreg_ks, is it possible?

2) I don't see any option in here
 to set all the nodes in a group to certain base channel.It will be nice
to add that , is there any space where I can create a PR or suggest?
This

takes only systemid, it will be nice if it can take groupname or groupid

3) How can i set spacecmd not to cache in config? I run in to many issues
with spacecmd not doing what it is supposed to be even after confirming the
changes in stdout. Some gets cleared vi clear_caches. I also can't
reproduce the issues, so i can't open bug report. It will be nice and handy
if there is any config option not to do caching.

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

Re: [Spacewalk-list] ERROR: Failed to connect to https://localhost/rpc/api

2019-08-08 Thread Ananta Chakravartula
Probably related to your cert. Can you curl with https://localhost ?


sent from my phone. Sory fer eny typeos

On Thu, Aug 8, 2019, 1:52 AM Engler, Axel [extern] <
axel.engler.ext...@n-ergie.de> wrote:

> Hello,
>
>
>
> if i start:  spacecmd  I get this errormessage:
>
> spacecmd
>
> Welcome to spacecmd, a command-line interface to Spacewalk.
>
>
>
> Type: 'help' for a list of commands
>
>   'help ' for command-specific help
>
>   'quit' to quit
>
>
>
> ERROR: Failed to connect to https://localhost/rpc/api
>
>
>
> Why??? I found no workaround  in WWW.
>
>
>
> Can you tell me what is wrong?
>
>
>
> Here the output from /usr/sbin/spacewalk-service status
>
>
>
> â postgresql.service - PostgreSQL database server
>
>Loaded: loaded (/etc/systemd/system/postgresql.service; enabled; vendor
> preset: disabled)
>
>Active: active (running) since Tue 2019-08-06 16:32:18 CEST; 15min ago
>
>   Process: 1731 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p
> ${PGPORT} -w -t 300 (code=exited, status=0/SUCCESS)
>
>   Process: 1708 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA}
> (code=exited, status=0/SUCCESS)
>
> Main PID: 1766 (postgres)
>
> Tasks: 34
>
>CGroup: /system.slice/postgresql.service
>
>ââ1766 /usr/bin/postgres -D /var/lib/pgsql/data -p 5432
>
>ââ1862 postgres: logger process
>
>ââ1881 postgres: checkpointer process
>
>ââ1882 postgres: writer process
>
>ââ1883 postgres: wal writer process
>
>ââ1884 postgres: autovacuum launcher process
>
>ââ1885 postgres: stats collector process
>
>ââ3351 postgres: rhnuser rhnschema 127.0.0.1(42734) idle
>
>ââ3464 postgres: rhnuser rhnschema 127.0.0.1(42736) idle
>
>ââ3465 postgres: rhnuser rhnschema 127.0.0.1(42738) idle
>
>ââ3466 postgres: rhnuser rhnschema 127.0.0.1(42740) idle
>
>ââ3467 postgres: rhnuser rhnschema 127.0.0.1(42742) idle
>
>ââ3468 postgres: rhnuser rhnschema 127.0.0.1(42744) idle
>
>ââ3470 postgres: rhnuser rhnschema 127.0.0.1(42746) idle
>
>ââ3472 postgres: rhnuser rhnschema 127.0.0.1(42748) idle
>
>ââ3473 postgres: rhnuser rhnschema 127.0.0.1(42750) idle
>
>ââ3474 postgres: rhnuser rhnschema 127.0.0.1(42752) idle
>
>ââ3476 postgres: rhnuser rhnschema 127.0.0.1(42754) idle
>
>ââ3477 postgres: rhnuser rhnschema 127.0.0.1(42756) idle
>
>ââ3478 postgres: rhnuser rhnschema 127.0.0.1(42758) idle
>
>ââ3479 postgres: rhnuser rhnschema 127.0.0.1(42760) idle
>
>ââ3480 postgres: rhnuser rhnschema 127.0.0.1(42762) idle
>
>ââ3481 postgres: rhnuser rhnschema 127.0.0.1(42764) idle
>
>ââ3488 postgres: rhnuser rhnschema 127.0.0.1(42766) idle
>
>ââ3489 postgres: rhnuser rhnschema 127.0.0.1(42768) idle
>
>ââ3491 postgres: rhnuser rhnschema 127.0.0.1(42772) idle
>
>ââ3658 postgres: rhnuser rhnschema 127.0.0.1(42778) idle
>
>ââ4334 postgres: rhnuser rhnschema 127.0.0.1(42832) idle
>
>ââ4753 postgres: rhnuser rhnschema 127.0.0.1(42854) idle
>
>ââ4754 postgres: rhnuser rhnschema 127.0.0.1(42856) idle
>
>ââ4755 postgres: rhnuser rhnschema 127.0.0.1(42858) idle
>
>ââ4756 postgres: rhnuser rhnschema 127.0.0.1(42860) idle
>
>ââ4757 postgres: rhnuser rhnschema 127.0.0.1(42862) idle
>
>ââ4765 postgres: rhnuser rhnschema 127.0.0.1(42864) idle
>
>
>
> â jabberd.service - Jabber Server
>
>Loaded: loaded (/usr/lib/systemd/system/jabberd.service; enabled;
> vendor preset: disabled)
>
>Active: active (exited) since Tue 2019-08-06 16:32:17 CEST; 15min ago
>
>   Process: 1720 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
>
> Main PID: 1720 (code=exited, status=0/SUCCESS)
>
> Tasks: 0
>
>CGroup: /system.slice/jabberd.service
>
>
>
> â tomcat.service - Apache Tomcat Web Application Container
>
>Loaded: loaded (/usr/lib/systemd/system/tomcat.service; enabled; vendor
> preset: disabled)
>
>Active: active (running) since Tue 2019-08-06 16:32:17 CEST; 15min ago
>
> Main PID: 1694 (java)
>
> Tasks: 93
>
>CGroup: /system.slice/tomcat.service
>
>ââ1694 /usr/lib/jvm/jre/bin/java -ea -Xms256m -Xmx256m
> -Djava.awt.headless=true
> -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
> -Dorg.apache.tomcat.util.http.Parameters.MAX_COUNT=1024 -XX:MaxNewS...
>
>
>
> â spacewalk-wait-for-tomcat.service - Spacewalk wait for tomcat
>
>Loaded: loaded
> (/usr/lib/systemd/system/spacewalk-wait-for-tomcat.service; static; vendor
> preset: disabled)
>
>Active: active (exited) since Tue 2019-08-06 16:32:40 CEST; 15min ago
>
>   Process: 1695 ExecStart=/usr/sbin/spacewalk-startup-helper
> wait-for-tomcat (code=exited, status=0/SUCCESS)
>
> Main PID: 1695 (code=exited, status=0/SUCCESS)
>
> Tasks: 0
>
>CGroup: 

Re: [Spacewalk-list] Spacewalk 2.8 - Pushing Errata Patches Failing

2019-08-01 Thread Ananta Chakravartula
Hopefully, this messages gets posted in the right thread :) . I don't know
how to comment on old conversations.

I had similar issue with error messages
```
D: Sending back response (6, 'Invalid function call attempted', {})
D: do_call packages.checkNeedUpdate ('rhnsd=1',)
```
I updated the yum-rhn-plugin package from the spacewalk client repo and it
resolved the issue.
___
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list

Re: [Spacewalk-list] spacecmd

2019-07-30 Thread Ananta Chakravartula
It doesn't work with out tty.

Ananta


sent from my phone. Sory fer eny typeos

On Tue, Jul 30, 2019, 5:24 AM Michael Mraka 
wrote:

> Ananta Chakravartula:
> > I got spacewalk setup using chef and I run some spacecmd commands part of
> > the recipe ( using execute resource), but chef-client fails with error
> >
> > ```
> > chef-client[32220]: Spacewalk Password: ERROR:
> > chef-client[32220]: Warning: Password input may be echoed.
> > chef-client[32220]:   passwd = fallback_getpass(prompt, stream)
> > chef-client[32220]: /usr/lib64/python2.7/getpass.py:83:
> GetPassWarning:
> > Can not control echo on the terminal.
> > chef-client[32220]: Spacewalk Password: ERROR:```
> > ```
> >
> > I do have ~/.spacecmd/config , but looks like spacecmd is looking for
> tty.
> > It doesn't error when i run chef-client manually.
>
> Hello Ananta,
>
> You can specify user/password on command line:
>
> $ spacecmd --user satuser --password satpwd ...
>
> >
> >
> > Cheers,
> > Ananta
>
> 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

Re: [Spacewalk-list] Unable to start jabberd and osa-dispatcher service successfully

2019-07-17 Thread Ananta Chakravartula
You probably have to change the hostname in here


grep osa /etc/rhn/rhn.conf



Ananta


sent from my phone. Sory fer eny typeos

On Wed, Jul 17, 2019, 10:38 PM Wenkai Chen <
wenkai_c...@ensigninfosecurity.com> wrote:

> HI Spacewalk Users,
>
>
>
> I encountered the following error after changing the hostname of the
> spacewalk server
>
>
>
> 2019/07/18 10:36:15 +08:00 3614 0.0.0.0: osad/jabber_lib.main('ERROR',
> 'Traceback (most recent call last):\n  File
> "/usr/lib/python2.7/site-packages/osad/jabber_lib.py", line 124, in
> main\nc = self.setup_connection(no_fork=no_fork)\n  File
> "/usr/lib/python2.7/site-packages/osad/jabber_lib.py", line 302, in
> setup_connection\nresource=self._resource)\n  File
> "/usr/lib/python2.7/site-packages/osad/dispatcher_client.py", line 36, in
> start\nself.auth(username, password, resource)\n  File
> "/usr/lib/python2.7/site-packages/osad/jabber_lib.py", line 894, in
> auth\nself.register(username, password)\n  File
> "/usr/lib/python2.7/site-packages/osad/jabber_lib.py", line 1140, in
> register\nself.sendRegInfo()\n  File
> "/usr/lib/python2.7/site-packages/jabber/jabber.py", line 645, in
> sendRegInfo\nreturn self.SendAndWaitForResponse(reg_iq)\n  File
> "/usr/lib/python2.7/site-packages/jabber/jabber.py", line 402, in
> SendAndWaitForResponse\nreturn self.waitForResponse(ID,timeout)\n  File
> "/usr/lib/python2.7/site-packages/osad/jabber_lib.py", line 1210, in
> waitForResponse\nraise JabberQualifiedError(self.lastErrCode,
> self.lastErr)\nJabberQualifiedError:  140203031027952; errcode=500; err=>\n')
>
>
>
> I ran the spacewalk-rename-hostname script and now this issue occurred.
> Please help. I am unable to find any useful resources online.
>
> Thank you.
>
>
>
> [image: A close up of a sign Description generated with very high
> confidence]
>
>
> *Chen Wenkai*
>
> Infrastructure Security Engineer
>
>[image: A picture containing building Description generated with
> high confidence] 
>  [image: A picture containing tableware Description generated with
> high confidence]  [image: A close up of
> a sign Description generated with high confidence]
> 
>
>
> *  E:*  wenkai_c...@ensigninfosecurity.com
>
>   *A:*  30A Kallang Place, Level 9 Right Wing, Singapore 339213
>
>
>
>
>
> --
>
> CONFIDENTIALITY NOTICE: *“This email is confidential and may also be
> privileged. If this email has been sent to you in error, please delete it
> immediately and notify us. Please do not copy, distribute or disseminate
> part or whole of this email if you are not the intended recipient or if you
> have not been authorized to do so. We reserve the right, to the extent and
> under circumstances permitted by applicable laws, to monitor, retain,
> intercept and block email messages to and from our systems. Thank you.” *
>
> ___
> 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] spacecmd

2019-07-16 Thread Ananta Chakravartula
I got spacewalk setup using chef and I run some spacecmd commands part of
the recipe ( using execute resource), but chef-client fails with error

```
chef-client[32220]: Spacewalk Password: ERROR:
chef-client[32220]: Warning: Password input may be echoed.
chef-client[32220]:   passwd = fallback_getpass(prompt, stream)
chef-client[32220]: /usr/lib64/python2.7/getpass.py:83: GetPassWarning:
Can not control echo on the terminal.
chef-client[32220]: Spacewalk Password: ERROR:```
```

I do have ~/.spacecmd/config , but looks like spacecmd is looking for tty.
It doesn't error when i run chef-client manually.


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

[Spacewalk-list] sync

2019-06-27 Thread Ananta Chakravartula
does repo sync delete any packages that are deleted in upstream? or just
downloads the updates?

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

Re: [Spacewalk-list] Spacewalk in container

2019-06-25 Thread Ananta Chakravartula
One benefit I can think of will be easier upgrades on new releases or move
spacewalk to different host running container service.
All we have to do is build a new image and mount configs and databases.



sent from my phone. Sory fer eny typeos

On Tue, Jun 25, 2019, 9:13 AM William Hongach 
wrote:

> Hello,
>
>
>
> I am curious to learn what specific benefits you are seeking to run in a
> container versus a traditional virtual machine given the usual Spacewalk
> model.  It seems like an interesting endeavor and perhaps a worthwhile
> discussion.
>
>
>
>
>
> *From:* spacewalk-list-boun...@redhat.com <
> spacewalk-list-boun...@redhat.com> *On Behalf Of *Ananta Chakravartula
> *Sent:* Tuesday, June 25, 2019 7:59 AM
> *To:* spacewalk-list@redhat.com
> *Subject:* Re: [Spacewalk-list] Spacewalk in container
>
>
>
> Thanks Michael.
>
>
>
> My main worry is to figure out what all files I have to mount in the
> container to keep the changes persistent on restart. Most of the articles I
> searched doesn't talk about it. They run sync commands directly inside the
> container without mounting any local volumes. I would imagine all the data
> is gone on container restart. I will check the links you sent.
>
>
>
> Anyways, I got the answer. I think I will skip the container install for
> now.
>
>
>
> Cheers,
>
> ac
>
>
> sent from my phone. Sory fer eny typeos
>
>
>
> On Tue, Jun 25, 2019, 5:40 AM Michael Mraka 
> wrote:
>
> Ananta Chakravartula:
> > Is it recommended/supported to run Spacewalk in a container?  What all
> > locations I have to make persistent? I see data written to /var/satellite
> > and /var/lib/pgsql. Are there any other places to keep in mind if I use
> > every service of spacewalk?
>
> Hello Ananta,
>
> Spacewalk in container has not been tested / supported.
> Some users tried and reported their progress:
>
> https://jacobsalmela.com/2019/02/18/spacewalk-containerized-and-running-in-kubernetes/
>
> http://egonzalez.org/spacewalk-red-hat-satellite-v5-in-a-docker-container-poc/
>
> > Also, Is there any chance of updating the documentation with support of
> > running Spacewalk in a Container?
> > https://github.com/spacewalkproject/spacewalk/wiki/HowToInstall
> >
> > Cheers,
> > ac
>
> 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] Spacewalk in container

2019-06-25 Thread Ananta Chakravartula
Thanks Michael.

My main worry is to figure out what all files I have to mount in the
container to keep the changes persistent on restart. Most of the articles I
searched doesn't talk about it. They run sync commands directly inside the
container without mounting any local volumes. I would imagine all the data
is gone on container restart. I will check the links you sent.

Anyways, I got the answer. I think I will skip the container install for
now.

Cheers,
ac


sent from my phone. Sory fer eny typeos

On Tue, Jun 25, 2019, 5:40 AM Michael Mraka 
wrote:

> Ananta Chakravartula:
> > Is it recommended/supported to run Spacewalk in a container?  What all
> > locations I have to make persistent? I see data written to /var/satellite
> > and /var/lib/pgsql. Are there any other places to keep in mind if I use
> > every service of spacewalk?
>
> Hello Ananta,
>
> Spacewalk in container has not been tested / supported.
> Some users tried and reported their progress:
>
> https://jacobsalmela.com/2019/02/18/spacewalk-containerized-and-running-in-kubernetes/
>
> http://egonzalez.org/spacewalk-red-hat-satellite-v5-in-a-docker-container-poc/
>
> > Also, Is there any chance of updating the documentation with support of
> > running Spacewalk in a Container?
> > https://github.com/spacewalkproject/spacewalk/wiki/HowToInstall
> >
> > Cheers,
> > ac
>
> 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] How to download Spacewalk for an offline install?

2019-06-22 Thread Ananta Chakravartula
yumdownloader to some machine on internet and transfer to a local repo?

cheers,
ac


sent from my phone. Sory fer eny typeos

On Fri, Jun 21, 2019, 11:49 AM Paul Greene  wrote:

> Is there an archive you can download of just the needed Spacewalk 2.9
> packages to do an offline install of Spacewalk (the server and client
> packages)?
>
> I have access to CentOS 7 base, updates, and EPEL 7 via local repos, so I
> don't need anything from there - I just need the spacewalk rpms.
>
> Thanks,
>
> PG
> ___
> 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] Spacewalk in container

2019-06-21 Thread Ananta Chakravartula
Is it recommended/supported to run Spacewalk in a container?  What all
locations I have to make persistent? I see data written to /var/satellite
and /var/lib/pgsql. Are there any other places to keep in mind if I use
every service of spacewalk?

Also, Is there any chance of updating the documentation with support of
running Spacewalk in a Container?
https://github.com/spacewalkproject/spacewalk/wiki/HowToInstall

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