[Spacewalk-devel] spacewalk-dobby replacement

2012-05-02 Thread Bo Maryniuk

Hi!

Here at SUSE we were working at Dobby replacement and we would like to
know what could be missing from the things that we already achieved.

We thought to make it exact Python clone and extend with PostgreSQL
support, but then we realized that we can make it even better,
deprecating cold backups and related things to that.


Done:
=
1. Works with Oracle DB and PostgreSQL.

2. No DBI drivers at all, no dependencies like that. It is just a
wrapper for SQL*Plus, RMAN and psql utilities.

3. No configuration at all, except it reads main rhn.conf
what DB is configured at the very moment. The rest it detects
from Oracle DB-related or PostgreSQL-related files separately.

4. Automatically changes set of commands available. For example,
it allows restart only listeners in Oracle, but no such feature
for PostgreSQL.

5. Hot backups for Oracle and PostgreSQL. No longer need to stop
entire system just to snapshot the db.

6. Never executes external processes with '... /dev/null ; printing
Done no matter what, but actually waits for the actual result
and tells you everything in details.

7. Oracle is put to autoextend mode, reporting free space. The extend
tablespace feature is just dropped.

8. No need of su - oracle (or su - postgres) any longer. :-)
Just make sure your user has sudo rights.

9. Renamed to mgr-db. This will also deprecate customer scripts for
previous db-control. Commands are incompatible.


To do:
==
1. (Critical) Automatically dealing with archivelog for Oracle DB, so
it won't blow away the entire disk space.

2. (Later) Add XML output, so the utility might be also crontabbed
and integrated into a Spacewalk directly, with no more CLI intervention.


Code  Documentation:
=
Soon on our GitHub. Hopefully, next week.


CLIshots:
=

Overview:

$ sudo ./mgr-db
SUSE Manager Database Control. Version 1.0
Copyright (c) by SUSE Linux Products GmbH

Available commands on Postgresql database:
backup-hot  Perform host database backup.
backup-status   Show backup status.
db-startStart the SUSE Manager Database.
db-status   Show database status.
db-stop Stop the SUSE Manager Database.
space-overview  Show database space report.
space-reclaim   Free disk space from unused object
in tables and indexes.
space-tablesShow space report for each table.
system-checkCommon backend healthcheck.


Config check:

$ sudo ./mgr-db system-check
INFO: Database needs to be restarted.
INFO: Wrote new client auth configuration.
Backup as /var/lib/pgsql/data/pg_hba.2012-05-02-15-13-39.conf
Stopping core...done
Starting core...done
Database is online
System check finished


Space Overview:

$ sudo ./mgr-db space-overview

Tablespace  | Size (Mb) | Avail (Mb) | Use %
+---++--
template1   | 6 | 91645  | 0.006
template0   | 6 | 91645  | 0.006
postgres| 5 | 91646  | 0.005
susemanager | 37| 91613  | 0.041


Backup options:

$ sudo ./mgr-db backup-hot help
SUSE Manager Database Control. Version 1.0
Copyright (c) by SUSE Linux Products GmbH

Command:
backup-hot

Description:
Perform host database backup.

Parameters:
--enableEnable or disable hot backups.
Values: on | off | purge
--destination   Destination directory of the backup.


Adding help to each command will print you what it is
and what are other params available.


P.S. Written in Python.


--
Bo Maryniuk

SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

I had a dream... and there were 1's and 0's
everywhere, and I think I saw a 2!

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

[Spacewalk-devel] spacewalk-dobby

2012-03-21 Thread Bo Maryniuk

Hi!

I was looking at Spacewalk Dobby wrapper around Oracle tools and I am
wondering if there is any plans to work on it? We find it lack of
some features that we would like to have, so we are looking to know
what are community plans on this particular software.

--
Bo Maryniuk

SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

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

Re: [Spacewalk-devel] spacewalk-dobby

2012-03-21 Thread Duncan Mac-Vicar P.

On 03/21/2012 01:34 PM, Bo Maryniuk wrote:

Hi!

I was looking at Spacewalk Dobby wrapper around Oracle tools and I am
wondering if there is any plans to work on it? We find it lack of
some features that we would like to have, so we are looking to know
what are community plans on this particular software.



We are particularly interested to know if dobby needs to gain Postgres 
support, of if replacing it completely was the plan.


--
Duncan Mac-Vicar P. - http://www.suse.com/

SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix 
Imendörffer, HRB 16746 (AG Nürnberg)

Maxfeldstraße 5, 90409 Nürnberg, Germany

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

Re: [Spacewalk-devel] spacewalk-dobby

2012-03-21 Thread Jan Pazdziora
On Wed, Mar 21, 2012 at 02:01:25PM +0100, Duncan Mac-Vicar P. wrote:
 On 03/21/2012 01:34 PM, Bo Maryniuk wrote:
 
 I was looking at Spacewalk Dobby wrapper around Oracle tools and I am
 wondering if there is any plans to work on it? We find it lack of
 some features that we would like to have, so we are looking to know
 what are community plans on this particular software.
 
 We are particularly interested to know if dobby needs to gain
 Postgres support, of if replacing it completely was the plan.

Excellent questions that I feel are calling for rigorous discussion.
What course of action do you envision in this area?

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat

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


Re: [Spacewalk-devel] spacewalk-dobby

2012-03-21 Thread Bo Maryniuk

On Wed, Mar 21, 2012 at 02:27:34PM +0100, Jan Pazdziora wrote:
 Excellent questions that I feel are calling for rigorous discussion.
 What course of action do you envision in this area?

We want to enhance it a lot. But we are not sure if this is a good idea
to invest into current implementation, which is also in Perl that we
would like to get rid of entirely.

We also don't like it asks for *oracle* user. :-)

--
Bo Maryniuk

SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

New linux package released. Please install on /dev/null

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

Re: [Spacewalk-devel] spacewalk-dobby

2012-03-21 Thread Jan Pazdziora
On Wed, Mar 21, 2012 at 03:42:28PM +0100, Bo Maryniuk wrote:
 
 to invest into current implementation, which is also in Perl that we
 would like to get rid of entirely.

Since you've touched the subject -- how is the Perl to Java WebUI
migration progressing?

-- 
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat

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


Re: [Spacewalk-devel] spacewalk-dobby

2012-03-21 Thread Cliff Perry

On 03/21/2012 10:42 AM, Bo Maryniuk wrote:

On Wed, Mar 21, 2012 at 02:27:34PM +0100, Jan Pazdziora wrote:
  Excellent questions that I feel are calling for rigorous discussion.
  What course of action do you envision in this area?

We want to enhance it a lot. But we are not sure if this is a good idea
to invest into current implementation, which is also in Perl that we
would like to get rid of entirely.



Well spacewalk-dobby has never really been made to work with OracleXE. 
For Spacewalk we have always had the database be managed independent of 
the Spacewalk application.


Obviously this is different in Satellite, for which this code was 
written, where at the product level we use it to manage the Oracle DB we 
ship as part of the Embedded product.


So, I'd say that today, for the Spacewalk project, we have no plans to 
refactor it - so depending on changes, the Spacewalk community (or even 
better the PostgreSQL Fedora/OpenSUSE/Upstream) may benefit from 
changes/enhancements to it.


Cliff


We also don't like it asks for *oracle* user. :-)

--
Bo Maryniuk

SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

New linux package released. Please install on /dev/null

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


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