123 Commits

Author SHA1 Message Date
lissav
f2fb69f021 add support for array of file names in get_filelist
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7227 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-25 15:18:04 +00:00
jbjohnso
e89dd334f0 -Add 'mknum' directive to nodeattribute expansion
-Try Safe module instead of clunky regexes to protect against bad data


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7213 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-24 20:46:22 +00:00
lissav
d1e30c8f7b fix return structure from get_filelist
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7199 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-24 13:27:45 +00:00
lissav
dc27bd58d5 change for new syntax in CNM support to get_filelist
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7198 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-24 12:24:45 +00:00
lissav
86a1fc10a7 add get_filelist routine for build the appropriate .sql and .pm files to run for the user, needed by xcatd and runsqlfiles
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7191 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-23 18:03:45 +00:00
lissav
7b81722d10 remove foreign key logic from buildcreate routine
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7167 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-20 12:53:05 +00:00
cjhardee
5b4ba54a2d Cross your fingers that this makes the million and a half dependant things happy. Changed the output of getNodeAttributes to merge the data from its different groups and to clone entries from one group for each entry in a folowing group with data in it.
I'm just gonna paste the description Jarrod sent to the group via email:

So if getAttribs ever returns more than one result, then getNodeAttribs will have it's output multiplied by that factor.  I'll draw out a table with changes Chris started adding while he was also trying to flatten the recursion.  Let's say 'n1' is in groups 'g1,g2,g3', and that we request columns 'c1,c2,c3,c4'  Let's also assume the primary key is not simply 'node', allowing the node column to contain duplicates (as in switch table).  I don't expect anyone to actually construct something this convoluted in practice, but:

node    |c1     |c2     |c3     |c4
n1      |v1     |       |       |
g2      |       |V2+=   |       |
g2      |       |v3     |v4     |
g3      |       |v5     |       |v6
g3      |       |v7     |v8     |v9

First, we get n1s record:
[
{ node => 'n1',  c1 => 'v1',}
]
We see that c2-c4 are still unsatisfiad, then we check g1, see there is no record, so no action takes place, then getAttribs node=>'g2' returns two records.  As a result, we clone our results so far and independently populate them:
[
{ node => 'n1', c1=> 'v1', c2 => 'v2+=' },
{ node => 'n1', c1 => 'v1', c2=> 'v3', c3 => 'v4'},
]
Now, in the first record, we are still looking to fill in c3, c4, and we are also still looking at c2 to complete the '+=' operation.
In the second record, we only need c4 now, no other columns will be checked for that record.

Then we hit g3.  We also get two results back (two was easier, but arbitrarily many are possible, btw).  Since both records are still looking to be completed, the two become 4 records (if one of the two records were satisfied before this point, the two would have become three instead):

[
{ node => 'n1', c1=> 'v1', c2 => 'v2v5',c4=>'v6' },
{ node => 'n1', c1 => 'v1', c2=> 'v3', c3 => 'v4',c4=>'v6'},
{ node => 'n1', c1=> 'v1', c2 => 'v2v7',c3=>v8,c4=>'v9' },
{ node => 'n1', c1 => 'v1', c2=> 'v3', c3 => 'v4',c4=>'v9'},
]

And that would be what getNodesAttribs would return in this case.




git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7131 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-18 18:14:48 +00:00
lissav
34a349cae0 add support for Foreign keys in Schema
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7127 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-18 15:06:17 +00:00
cjhardee
f8c12d6285 fixed nodels to include mutliple results from the same group and to return [undef] when there are no results instead of [{}]
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7087 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-13 14:40:26 +00:00
lissav
37640c0498 More DB2/MYSQl fixes to setNodesAttribs
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7071 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-12 16:26:20 +00:00
jbjohnso
30553d8b13 -Remove debug output
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7023 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-10 14:08:49 +00:00
lissav
b1c06a86ed fix bad problem in creating tables in db2- I introduces
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7022 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-10 13:29:46 +00:00
jbjohnso
e82e3f5f8b -Give up after 30 seconds of starvation
-Actually sleep in the retry loop rather than being a busy loop


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6992 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-06 12:54:41 +00:00
lissav
5f21467bca fix setting of types for attributes to invalid types for DB2 as much as possible for now
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6978 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-04 14:17:31 +00:00
lissav
9d7014c2ca fix mysql calls in setNodesAtt
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6954 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-03 14:12:05 +00:00
lissav
d1f418d1d7 fix changed code in setNodesAttribs for DB2
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6941 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-08-02 13:24:53 +00:00
cjhardee
6cc88808d4 Fixed a problem with missing attributes from getNodeAttributes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6894 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-28 16:19:51 +00:00
cjhardee
1ed64502bb Fixed a bug I introduced when adding the ability to get multiple results from nodes and thier groups using nodels. The problem was the results had multiple entries for some attributes.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6884 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-28 06:17:30 +00:00
cjhardee
21f033432c Rewrote how attributes from a node and it's groups are looked up and added the ability to concatinate values for these attributes from mulitple sources by adding "+=NEXTRECORD" to the values in the data.
For example, if bootparams.addkcmdline for the node is "test1+=NEXTRECORD" and bootparams.addkcmdline for the group it is in is "test2", the returned values from nodels for bootparams.addkcmdline will be "test1 test2".

Not that this stops after it finds a single occurance of a value for this attriute without the "+=NEXTRECORD".  If all values from the groups are wanted, each should have "+=NEXTRECORD" at the end of the entry.



git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6840 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-23 15:47:21 +00:00
jbjohnso
e032aa9375 -Nonstop xCAT, xcatd starting replaces old xCAT instance with nearly no interruption
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6680 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-07-08 20:49:12 +00:00
lissav
5e5d506704 fix changes to getAllAttributesWhere, reading all table entries
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5816 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-04-19 16:03:09 +00:00
lissav
7bb245ceef expand getAllAttribsWhere to accetp ALL to return all attributes in the table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5731 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-04-09 13:37:51 +00:00
lissav
2067bafb90 more work on getAllAttribsWhere
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5683 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-04-06 13:32:23 +00:00
lissav
004256d3a6 fix comments
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5682 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-04-06 13:17:37 +00:00
lissav
298ed86f6c fix syntax error in mysql path of getAllAttribsWhere routine
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5673 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-04-05 19:42:12 +00:00
linggao
2b1673a9d0 fixed a problem for notification
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5648 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-04-01 20:02:08 +00:00
lissav
c9e5a7a9d2 remove truncate routine, will no use
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5582 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-03-25 17:47:05 +00:00
lissav
8490ba2f8f fix db2 eventlog/auditlog creattion
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5562 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-03-23 16:18:40 +00:00
jbjohnso
f3daa4d8e0 -Provide a means for nodels to display group inheritence
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5395 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-03-05 22:28:36 +00:00
lissav
bd065d13c1 for all databases commit immediately after table create
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5338 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-03-02 18:09:09 +00:00
lissav
9c63655629 for db2 must check schema and table name for existence. Create table add other tables to the xcatdb database one is a system policy table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5253 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-02-22 19:09:41 +00:00
lissav
57d6581450 db2 fix
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5242 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-02-19 18:55:34 +00:00
jbjohnso
91cc6ff09d -Fix mistake in previous change
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5241 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-02-19 18:44:02 +00:00
jbjohnso
4e76bb177c -Refresh cache if it is modified
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5233 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-02-19 14:45:49 +00:00
jbjohnso
c0c7ff2c54 -Fix erroneous db worker process cloning
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5231 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-02-17 22:19:39 +00:00
lissav
1921256e4c must export the DB2INSTANCE before the connect to the database. This is need particularly for the daemon which cannot get it from the environement
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5230 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-02-17 14:38:03 +00:00
lissav
1fcbdfcbb2 more db2 fixes
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5201 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-02-09 16:20:43 +00:00
lissav
ba56b58079 more db2 updates
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5189 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-02-08 14:29:47 +00:00
lissav
02bb6bb628 start of separating the creation of the db2 table logic from the other databases
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5164 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-02-05 15:17:29 +00:00
jbjohnso
3ffa807168 -Reapply recent fixes lost in recent checkins
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5020 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-01-22 20:08:33 +00:00
lissav
db7ddbb551 more db2 updates and added error message
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5008 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-01-21 20:39:55 +00:00
lissav
cdbd665ed1 change to support DB2
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4981 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-01-19 19:34:46 +00:00
jbjohnso
d2cc0f30b6 -If children should occur, keep them from becoming zombies
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4900 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-01-06 20:03:48 +00:00
jbjohnso
3ff2c0eaaa -Fix setNodesAttribs syntax problem
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4891 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2010-01-05 15:23:42 +00:00
daniceexi
68de42c84b def commands performance enhancement: 1. fix performance issue in the getobjdefs; 2. def commands only get necessary attribute by getobjdefs; 3. lsdef without flags only displays node name; 4. rmobjdefs does not check the only_if condition; 5. Make Table::delEntries function can handle multiple records for a table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4864 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-12-30 07:50:28 +00:00
linggao
6394de13d9 fixed problem for PostgreSQL when changing primary keys for a table
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4819 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-12-17 17:01:08 +00:00
lissav
f26e02f42f remove need to set ANSI_QUOTES for MySQL database
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4705 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-12-01 19:26:56 +00:00
jbjohnso
909517a2c5 -Add RHEL-6 alpha support for stateful deployment
-Fix bug in recent Table.pm enhancements


git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4686 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-11-28 13:45:52 +00:00
jbjohnso
600fae75ef -Raise nodes at a time in the setNodesAttribs to 999 to account for the re-execute strategy allowing it to be that high
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4684 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-11-28 00:52:10 +00:00
jbjohnso
577661b712 -Change update strategy. Previous strategy of aggregated update statements acheived the lowest required execution of statements, but required a prepare per execute. This strategy uses a single prepare, though does not reduce execute. One prepare+thousands of executes is cheapare than a few dozen prepares+executes
Final tally:
    before this change, a particular stress test:
        real    0m48.731s
        real    0m54.434s
    after this change, the same test:
        real    0m3.231s
        real    0m2.976s



git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4675 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2009-11-26 18:22:17 +00:00