Re: [Spacewalk-devel] pgsql-master merge
On Tue, 21 Jul 2009, Jeff Ortel wrote: All, Yesterday I merged master-pgsql and today I'm planning on doing some schema verification. Assuming that I can verify the schema (for oracle) is equivalent, I will merge the pgsql branch TO master tomorrow 7/22. The following review items have been addressed: 1) Trailing white space removed from common/tables/*.sql 2) Schema upgrade scripts refactoring reverted. The upgrade scripts will remain as they are today. 3) Chameleon added to build roots. 4) Upgrade script generated to replace named not-null constraints with anonymous column modifier. Any other issues to be resolved before the merge? Last chance to review pgsql before it goes to master. AWESOME!!! :) --g -- Computer Science professors should be teaching open source. Help make it happen. Visit http://teachingopensource.org. ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] pgsql-master merge
Jeff Ortel jor...@redhat.com writes: Yesterday I merged master-pgsql and today I'm planning on doing some schema verification. Assuming that I can verify the schema (for oracle) is equivalent, I will merge the pgsql branch TO master tomorrow 7/22. Sweet. Where are we on having an actually usable pgsql port? Last I heard there were still uncompleted tasks as far as installation went. regards, tom lane ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] pgsql-master merge
On Tue, 21 Jul 2009, Tom Lane wrote: Jeff Ortel jor...@redhat.com writes: Yesterday I merged master-pgsql and today I'm planning on doing some schema verification. Assuming that I can verify the schema (for oracle) is equivalent, I will merge the pgsql branch TO master tomorrow 7/22. Sweet. Where are we on having an actually usable pgsql port? Last I heard there were still uncompleted tasks as far as installation went. We've got to go through every query yet, don't we? --g -- Computer Science professors should be teaching open source. Help make it happen. Visit http://teachingopensource.org. ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] pgsql-master merge
Good Evening. On Tue, 21 Jul 2009 13:28:28 -0400 (EDT) Greg DeKoenigsberg g...@redhat.com wrote: On Tue, 21 Jul 2009, Tom Lane wrote: Jeff Ortel jor...@redhat.com writes: Yesterday I merged master-pgsql and today I'm planning on doing some schema verification. Assuming that I can verify the schema (for oracle) is equivalent, I will merge the pgsql branch TO master tomorrow 7/22. Sweet. Where are we on having an actually usable pgsql port? Last I heard there were still uncompleted tasks as far as installation went. We've got to go through every query yet, don't we? We ran into several performance issues on our Satellite Server with Standalone Oracle DB (about 3000 clients) due to extremely large queries (e.g. with about 1500 scheduled actions). I am currently talking to our database engineer about optimization and we also want to take a deeper look at hibernate caching features. So maybe it's a good time to start revisioning some queries. I will let you know when we got more detailed information. Best Regards Marcus ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] pgsql-master merge
Milan Zazrivec wrote: On Tuesday 21 July 2009 17:48:35 Jeff Ortel wrote: All, Yesterday I merged master-pgsql and today I'm planning on doing some schema verification. Assuming that I can verify the schema (for oracle) is equivalent, I will merge the pgsql branch TO master tomorrow 7/22. The following review items have been addressed: 1) Trailing white space removed from common/tables/*.sql 2) Schema upgrade scripts refactoring reverted. The upgrade scripts will remain as they are today. 3) Chameleon added to build roots. 4) Upgrade script generated to replace named not-null constraints with anonymous column modifier. Any other issues to be resolved before the merge? Last chance to review pgsql before it goes to master. The oracle schema in pgsql branch does not deploy cleanly. There's a dependency problem: rhn_channel package body uses procedures from rhn_user, which in the resulting main.sql is defined (well, declared) after rhn_channel. Same for rhn_config_channel, rhn_entitlements, rhn_org, rhn_server pbs. I've been deploying all day and haven't seen this. I'll look into it further. Many columns declared as NUMBER(n) were changed in pgsql branch to NUMBER (rhn_command_target table for example), which I don't believe is equivalent. Yes, I caught this during side-by-side verification and I'm fixing in chameleon now. Also, I'm pretty sure everything rhnfaq* related is not needed in the schema now. Yes. I caught this (also) during side-by-side verification and removed them. -MZ ___ 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] Selinux Temporarily Disabled in Devel Repo
On Mon, Jul 20, 2009 at 03:53:14PM -0300, Devan Goodwin wrote: We've got both selinux build problems for Fedora 11, as well as selinux denials post install on at least el5. As such I've temporarily disabled What are the AVC denials on EL 5? I'm aware of the build problems on F11 but EL 5 should be clean. Do you have a bugzilla number? -- Jan Pazdziora | adelton at #satellite*, #brno Satellite Engineering, Red Hat ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] Selinux Temporarily Disabled in Devel Repo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 21 Jul 2009 21:33:56 +0200 Jan Pazdziora jpazdzi...@redhat.com wrote: On Mon, Jul 20, 2009 at 03:53:14PM -0300, Devan Goodwin wrote: We've got both selinux build problems for Fedora 11, as well as selinux denials post install on at least el5. As such I've temporarily disabled What are the AVC denials on EL 5? I'm aware of the build problems on F11 but EL 5 should be clean. Do you have a bugzilla number? Now filed here: https://bugzilla.redhat.com/show_bug.cgi?id=513071 Happened on CentOS 5.2. Cheers, Devan - -- Devan Goodwin dgood...@redhat.com Software Engineer Spacewalk / RHN Satellite Halifax, Canada 650.567.9039x79267 -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (GNU/Linux) iEYEARECAAYFAkpmJjQACgkQAyHWaPV9my62FgCeL0stMwOINMoVhAXphKj7mGbZ +0wAoLSNVNaKsj4IlV8sHkTEyQnR/1E0 =d9Mv -END PGP SIGNATURE- ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] Re: java/code
Um what is this for? seems like a lot of code for a one time thing. My first impression is -1 to this commit. jesus On Tue, Jul 21, 2009 at 5:23 PM, Mike McCunemmcc...@fedoraproject.org wrote: java/code/src/com/redhat/rhn/domain/task/Task.hbm.xml | 9 java/code/src/com/redhat/rhn/domain/task/TaskFactory.java | 21 ++ java/code/src/com/redhat/rhn/domain/task/test/TaskTest.java | 15 + java/code/src/com/redhat/rhn/manager/BaseTransactionCommand.java | 75 +++ java/code/src/com/redhat/rhn/manager/errata/cache/UpdateErrataCacheCommand.java | 41 --- java/code/src/com/redhat/rhn/manager/satellite/UpgradeCommand.java | 105 ++ java/code/src/com/redhat/rhn/manager/satellite/test/UpgradeCommandTest.java | 59 + java/code/src/com/redhat/rhn/webapp/RhnServletListener.java | 12 + 8 files changed, 299 insertions(+), 38 deletions(-) New commits: commit 8f94b49ce1dd35671f627bd4161e6355631d00f1 Author: Mike McCune mmcc...@redhat.com Date: Tue Jul 21 14:22:17 2009 -0700 512814 - adding spot to add 'upgrade' logic to our startup of tomact. Now coders can add an entry to rhnTaskQueue to indicate to our Java code that we want to run a set of business logic during an upgrade. diff --git a/java/code/src/com/redhat/rhn/domain/task/Task.hbm.xml b/java/code/src/com/redhat/rhn/domain/task/Task.hbm.xml index 4b32495..276b5e8 100644 --- a/java/code/src/com/redhat/rhn/domain/task/Task.hbm.xml +++ b/java/code/src/com/redhat/rhn/domain/task/Task.hbm.xml @@ -33,4 +33,13 @@ PUBLIC -//Hibernate/Hibernate Mapping DTD 3.0//EN and task_data = :data and earliest = :earliest]] /query + sql-query name=Task.lookupByNameLike + ![CDATA[SELECT {t.*} + FROM rhnTaskQueue {t} + WHERE t.task_name like :namelike + ]] + return alias=t class=com.redhat.rhn.domain.task.Task / + /sql-query + + /hibernate-mapping diff --git a/java/code/src/com/redhat/rhn/domain/task/TaskFactory.java b/java/code/src/com/redhat/rhn/domain/task/TaskFactory.java index 70c71f1..50149eb 100644 --- a/java/code/src/com/redhat/rhn/domain/task/TaskFactory.java +++ b/java/code/src/com/redhat/rhn/domain/task/TaskFactory.java @@ -74,6 +74,16 @@ public class TaskFactory extends HibernateFactory { } /** + * Remove a completed Task from the queue. + * + * @param taskIn to remove + */ + public static void remove(Task taskIn) { + singleton.removeObject(taskIn); + } + + + /** * Lookups up a task. * @param org The org containing the task * @param name The name of the task @@ -126,4 +136,15 @@ public class TaskFactory extends HibernateFactory { return c.list(); } + + /** + * Lookup a list of Tasks who's name start with passed in param + * @param nameIn to lookup + * @return List of Tasks or null if not found. + */ + public static List getTaskListByNameLike(String nameIn) { + return HibernateFactory.getSession().getNamedQuery(Task.lookupByNameLike) + .setString(namelike, nameIn + %) + .list(); + } } diff --git a/java/code/src/com/redhat/rhn/domain/task/test/TaskTest.java b/java/code/src/com/redhat/rhn/domain/task/test/TaskTest.java index 2d9333f..c4559d1 100644 --- a/java/code/src/com/redhat/rhn/domain/task/test/TaskTest.java +++ b/java/code/src/com/redhat/rhn/domain/task/test/TaskTest.java @@ -24,6 +24,8 @@ import com.redhat.rhn.testing.UserTestUtils; import org.hibernate.Session; +import java.util.List; + /** * TaskTest * @version $Rev$ @@ -61,4 +63,17 @@ public class TaskTest extends RhnBaseTestCase { t3.setName(foo); assertFalse(t2 should not be equal to t3, t2.equals(t3)); } + + public void testLookupNameLike() throws Exception { + Org org = UserTestUtils.findNewOrg(testOrg); + String testname = task_object_unit_test_ + TestUtils.randomString(); + Long testdata = new Long(42); + Task t = TaskFactory.createTask(org, testname, testdata); + + List lookedup = TaskFactory.getTaskListByNameLike(task_object_unit_test_); + assertNotNull(lookedup); + assertTrue(lookedup.size() 0); + assertTrue(lookedup.get(0) != null); + assertTrue(lookedup.get(0) instanceof Task); + } } diff --git a/java/code/src/com/redhat/rhn/manager/BaseTransactionCommand.java b/java/code/src/com/redhat/rhn/manager/BaseTransactionCommand.java new file mode 100644 index 000..1f47b46 --- /dev/null +++ b/java/code/src/com/redhat/rhn/manager/BaseTransactionCommand.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2009 Red Hat, Inc. + * + * This software is licensed to you under the GNU General Public License, + * version 2 (GPLv2). There is NO WARRANTY for this software, express or + * implied, including the implied warranties of MERCHANTABILITY or FITNESS + * FOR A
[Spacewalk-devel] pgsql merge status
All, I spend most of the day doing side-by-side verification of oracle schema installed from master and pgsql. I've resolve most of the discrepancies and pushed them. I still have a few to deal with, most of them straight forward. I also fixed a bug in chameleon and it will have to be rebuilt in koji and pushed into the build roots. One of the items that resurfaced is synonyms. The original plan was to do away with the synonyms because postgres does not support them. I've removed references to the synonyms in the schema (insert files) but the monitoring code seems to depend heavily on them. So, do leave the synonyms in the schema as oracle specific (the monitoring code will be broken for postgres) or do we replace references to the synonyms in the monitoring code for 0.6? Can someone comment on the LOE for this? Regards, Jeff ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] pgsql merge status
Jeff Ortel jor...@redhat.com writes: One of the items that resurfaced is synonyms. The original plan was to do away with the synonyms because postgres does not support them. I've removed references to the synonyms in the schema (insert files) but the monitoring code seems to depend heavily on them. So, do leave the synonyms in the schema as oracle specific (the monitoring code will be broken for postgres) or do we replace references to the synonyms in the monitoring code for 0.6? Can someone comment on the LOE for this? Perhaps we could use views as a PG substitute for synonyms? I agree with the idea of getting rid of them over the long term, but it would be nice to not have that in the critical path if there is a lot of code that would have to change. regards, tom lane ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel