Re: [Spacewalk-devel] View services and partitions
I want to add services configuration for 2 reasons: - being able to update a rpm AND schedule a service restart - being able to see the actual configuration of the server For the second point, yes, I was talking about disk partitionning. Something like df-h about of /etc/fstab content nicely presented. 2012/7/19 Patrick Hurrelmann patrick.hurrelm...@lobster.de: On 19.07.2012 09:13, Pierre Casenove wrote: Hello list, I would like to add two functionnalities to Spacewalk (without any idea on an approx date) but would like to check with you if it's OK. 1) Add a page on System to manages services on the clients, with 2 views: a) Something like the output of chkconfig command (dunnon how to get this from python!), and being able to modify the configuration b) Planify start/stop/restart of the services (interface to service command) 2) Have the soft partitionning of the client in the web ui Now, my questions. First, do you agree this would be interesting features? Now on an architecture point of view: - should it be an additional client package or integrated in the actual code? - on the server, should it be new web pages or integrated in existing ones? - If you have any advices, I'll take them with great pleasure! Thanks in advance, Pierre Hi Pierre, personally I like this idea. On the other hand one could argue that such functionality does not belong inside SW. But as rpms are pushed and services get updated this would be very handy if these functionalities are connected. E.g. update rpm A with service Ad. Schedule update _and_ restart of service. install rpm B with service Bd. Schedule install _and_ activate service But you you please elaborate point 2? Are you speaking of disk partitioning or am I getting this wrong? Regards Patrick -- Lobster LOGsuite GmbH, Hauptstraße 67, D-82327 Tutzing HRB 178831, Amtsgericht München Geschäftsführer: Dr. Martin Fischer, Rolf Henrich ___ 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
[Spacewalk-devel] View services and partitions
Hello list, I would like to add two functionnalities to Spacewalk (without any idea on an approx date) but would like to check with you if it's OK. 1) Add a page on System to manages services on the clients, with 2 views: a) Something like the output of chkconfig command (dunnon how to get this from python!), and being able to modify the configuration b) Planify start/stop/restart of the services (interface to service command) 2) Have the soft partitionning of the client in the web ui Now, my questions. First, do you agree this would be interesting features? Now on an architecture point of view: - should it be an additional client package or integrated in the actual code? - on the server, should it be new web pages or integrated in existing ones? - If you have any advices, I'll take them with great pleasure! Thanks in advance, Pierre ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] Fwd: ISE on SW 1.5 on user management
Hi, Please find attached a patch for SW 1.5 on postgresql addressing a ISE on visibleSystems.java due to default cast to Integer on postgresql. The ISE does not happen well logged in as Spacewalk administrator, only with added users. pierre -- Forwarded message -- From: Pierre Casenove pcasen...@gmail.com Date: 2011/12/9 Subject: Re: ISE on SW 1.5 on user management To: spacewalk-l...@redhat.com Me again. After reading the PostGreSQLPortingGuide (should have done this before), I found this: https://fedorahosted.org/spacewalk/wiki/PostgreSQLPortingGuide#Defaultcasttointeger I don't have my set up box available, but class com.redhat.rhn.frontend.dto.VisibleSystems has to be modified. And by comparing VisibleSystems class to SystemOverview class, here is what should be modified to correct the error: At line 78 , add this function: /** * For compatibility reasons with PostgreSQL we accept also Integer. * * @param selectableIn Whether a server is selectable one if selectable, * null if not selectable */ public void setSelectable(Integer selectableIn) { selectable = (selectableIn != null); } I'm really sorry but I can't format a patch or what so ever, I have no way to access the spacewalk server for the week end. And with 1.6 branching arriving on monday... I would like to have this patch included. Pierre 2011/12/8 Pierre Casenove pcasen...@gmail.com: Just a quick update: running the query in psql shell works (I forgot the select * at the beggining). So the query is correct. From the error log, I guess that an Integer is returned in case the user is ldap-enabled, and a Long for a regular user. But I wasn't able to find the code behind this. Pierre 2011/12/8 Pierre Casenove pcasen...@gmail.com: Hello List, I've plugged my SW 1.5 installation with PGSQL on a LDAP. When I create a user with PAM authentication, and then going to Users -- ldapUser -- Systems, I get an ISE. If I navigate to this page on a non ldap user, I don't get an ISE. I've attached the catalina.out logs. Two errors appears: First: ERROR com.redhat.rhn.common.db.datasource.CachedStatement - Error while processing cached statement sql: select * from ( SELECT DISTINCT S.id AS ID, S.name AS SERVER_NAME, (SELECT 1 FROM rhnServerFeaturesView SFV WHERE SFV.server_id = S.id AND SFV.label = 'ftr_system_grouping') AS selectable FROM rhnServer S, rhnUserServerPerms USP WHERE USP.user_id = ? AND S.id = USP.server_id ) X ORDER BY UPPER(COALESCE(X.server_name, '(none)')), X.id -- When running it in psql, here is the output : ERROR: syntax error at or near ) LINE 10: ) X Second error: Could not find method called: setSelectable in class: com.redhat.rhn.frontend.dto.VisibleSystems with params: [type: java.lang.Integer, value: 1] Indeed, looking at the source code, it is public void setSelectable(Long selectableIn) Could you please point me to some clue? I can't find in the source code where the query is built, and I don't see what is erroneous in the query. Thanks, Pierre Integer_Long_VisibleSystems.patch Description: Binary data ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [Spacewalk-list] Modification of spacewalk-service script
Let's forget the subject, no problem. I share Miroslav point of view, but understand yours. And you're right, it'll surely be a maintenance burden. I'll investigate on database reconnection problem only. I just wanted to help, you know! By the way, I couldn't get rid of osa-distpatcher error message connecting to jabber, which was the beginning of the discussion! The problem is that jabberd do listen on the network but is not completely ready (message sm not ready returned by jabberd when connecting). So the pid file already exists and no test can be done to check if jabberd is really ready. Calling sleep 2 was the only way around (even sleep 1 didn't do the trick). From my point of view, as osa-dispatcher reconnects 10 seconds after, the only problem is the message displayed to the user. But it is better thant calling sleep 2 in the script during startup I think. Pierre 2011/11/13 Jan Pazdziora jpazdzi...@redhat.com On Sat, Nov 12, 2011 at 09:52:07PM +0100, Pierre Casenove wrote: Ok no problem, no patch so. If you're against it, I won't insist! Just to answer your email : HTTPD is also quite independant from the spacewalk product and still, it is controlled. And if postgresql gets It is not as independent as we'd like -- we use mod_wsgi/mod_perl, so for example an upgrade of Spacewalk requires restart of httpd. On the other hand, even upgrade of Spacewalk's database schema does not require restart of the underlying database server. restarted with SP up and running, spacewalk needs also to be restarted (connection is lost and never gets restored) This would be a bug, it should be reported as such, investigated and fixed. On Sat, Nov 12, 2011 at 04:54:48PM -0500, Miroslav Suchy wrote: - Original Message - I'm against this change. The database (PostgreSQL, Oracle XE) is completely independent from the Spacewalk software product and the spacewalk-service script should have no business fiddling with them. Define completely independent. It is not true. Spacewalk use it. As it use apache. And tomcat. And jabber. That's true, Spacewalk uses the database. But the database server is like filesystem or network for Spacewalk. No action of the Spacewalk application (not even its upgrade) requires restart of the database. Unlike apache, tomcat, and (presumably) jabberd -- we modify the configuration of apache, tomcat, and jabberd for Spacewalk to work correctly, and for that we need to restart those services. I - personally - would not spent my devel cycles on it, but Pierre is willing to do that and contribute it. We recommend to run Spacewalk on dedicated machine. And I suppose that most users obey this recommendation. So if there is DB instance, it is very likely dedicated to Spacewalk. But yes, it can be used for other purposes as well. For that reason, I wanted to have this option disabled by default. So current behavior will be preserved. [...] As I said, more user already wanted it. And it is much easier and better for users to code this wrapper once, and leave dozen admins to flip one variable as compared to leave dozens admins to write theirs wrapper. The problem is -- it is likely to become maintenance burden in the long run. Noone but few people will use it because the default will be to have the option off, therefore we won't be testing it. -- 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 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [Spacewalk-list] Modification of spacewalk-service script
Switching to the correct list. OK, I'll modify the script to try to find /etc/init.d/postgresql OR /etc/systemd/postgresql.service. And then, I let service to the job! Thanks for the tips on systemd and see you on monday for the updated patch. Pierre 2011/11/12 Miroslav Suchy msu...@redhat.com - Original Message - 3) I'll try to find the best way to detect if systemd is used or not. I don't have a F16 box, so a few questions: - How is postgresql controlled with systemd: postgresql start and stop? old service postgresql XXX still works, it is translated to systemctl XXX postgresql.service, which is native for systemd. - Is postgresql the only software that is integrated with systemd in spacewalk? Probably yes (I'm not sure about httpd). But we use command service, which works for both old sys-v scripts and for systemd too. I recommend you the same. Mirek ___ Spacewalk-list mailing list spacewalk-l...@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [Spacewalk-list] Modification of spacewalk-service script
Thanks a lot for your help and hints. I'll parse rhn.conf file to find the correct db (db_backend). For postgresql real activation, I'll do some tests on my server and use your outputs. pierre 2011/11/12 Miroslav Suchy msu...@redhat.com - Original Message - Switching to the correct list. OK, I'll modify the script to try to find /etc/init.d/postgresql OR /etc/systemd/postgresql.service. And then, I let service to the job! Thanks for the tips on systemd and see you on monday for the updated patch. FYI: # chkconfig postgresql on Note: Forwarding request to 'systemctl enable postgresql.service'. ln -s '/lib/systemd/system/postgresql.service' '/etc/systemd/system/multi-user.target.wants/postgresql.service' So presence of /etc/systemd/postgresql.service means just that postgresql-server is installed. It does not mean, that it is enabled! And do not forget that I can have installed (I'm weird men) postgresql and oracle, but spacewalk will use only one of them. Some hints: # chkconfig postgresql Note: Forwarding request to 'systemctl is-enabled postgresql.service'. enabled # echo $? 0 # LC_ALL=C chkconfig postgresql off Note: Forwarding request to 'systemctl disable postgresql.service'. rm '/etc/systemd/system/multi-user.target.wants/postgresql.service' # LC_ALL=C chkconfig postgresql Note: Forwarding request to 'systemctl is-enabled postgresql.service'. disabled # echo $? 1 Hopes, this will help you. Mirek ___ 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