Comments (16)
Hi, SW is paired with racktables dictionary, make sure that your racktables have your system in dictionary. Racktables->Configuration->Dictionary->server OS type
from rt-server-client.
Yes the Dictionary attributes are there, for example Ubuntu 14.04 has
uint_value of 2109. So if I select the AttributeValue Field for a host
that already has the SW Type set I get:
mysql> select * from AttributeValue where object_id = 182 AND attr_id = 4;
+-----------+------------+---------+--------------+------------+-------------+
| object_id | object_tid | attr_id | string_value | uint_value |
float_value |
+-----------+------------+---------+--------------+------------+-------------+
| 182 | 1504 | 4 | NULL | 2109 |
NULL |
+-----------+------------+---------+--------------+------------+-------------+
On 1/30/15 9:58 AM, Robert Vojcik wrote:
Hi, SW is paired with racktables dictionary, make sure that your
racktables have your system in dictionary.
Racktables->Configuration->Dictionary-server OS type—
Reply to this email directly or view it on GitHub
#6 (comment).
Brian Smith| System Administrator II |Information & Media
Technology|Full Sail University
T407.462.3303
from rt-server-client.
mysql> select * from Dictionary where dict_value like 'Ubuntu%';
+------------+----------+-------------+-------------------------------+
| chapter_id | dict_key | dict_sticky | dict_value |
+------------+----------+-------------+-------------------------------+
| 13 | 1704 | yes | Ubuntu%GSKIP%Ubuntu 10.04 LTS |
| 13 | 1705 | yes | Ubuntu%GSKIP%Ubuntu 10.10 |
| 13 | 1706 | yes | Ubuntu%GSKIP%Ubuntu 11.04 |
| 13 | 1707 | yes | Ubuntu%GSKIP%Ubuntu 11.10 |
| 13 | 1708 | yes | Ubuntu%GSKIP%Ubuntu 12.04 LTS |
| 13 | 1813 | yes | Ubuntu%GSKIP%Ubuntu 12.10 |
| 13 | 2107 | yes | Ubuntu%GSKIP%Ubuntu 13.04 |
| 13 | 2108 | yes | Ubuntu%GSKIP%Ubuntu 13.10 |
| 13 | 2109 | yes | Ubuntu%GSKIP%Ubuntu 14.04 LTS |
| 13 | 428 | yes | Ubuntu%GSKIP%Ubuntu 4.10 |
| 13 | 429 | yes | Ubuntu%GSKIP%Ubuntu 5.04 |
| 13 | 430 | yes | Ubuntu%GSKIP%Ubuntu 5.10 |
| 13 | 431 | yes | Ubuntu%GSKIP%Ubuntu 6.06 LTS |
| 13 | 432 | yes | Ubuntu%GSKIP%Ubuntu 6.10 |
| 13 | 433 | yes | Ubuntu%GSKIP%Ubuntu 7.04 |
| 13 | 434 | yes | Ubuntu%GSKIP%Ubuntu 7.10 |
| 13 | 435 | yes | Ubuntu%GSKIP%Ubuntu 8.04 LTS |
| 13 | 796 | yes | Ubuntu%GSKIP%Ubuntu 8.10 |
| 13 | 1054 | yes | Ubuntu%GSKIP%Ubuntu 9.04 |
| 13 | 1320 | yes | Ubuntu%GSKIP%Ubuntu 9.10 |
+------------+----------+-------------+-------------------------------+
20 rows in set (0.00 sec)
On 1/30/15 10:02 AM, Brian Smith wrote:
Yes the Dictionary attributes are there, for example Ubuntu 14.04 has
uint_value of 2109. So if I select the AttributeValue Field for a
host that already has the SW Type set I get:mysql> select * from AttributeValue where object_id = 182 AND attr_id = 4;
+-----------+------------+---------+--------------+------------+-------------+
| object_id | object_tid | attr_id | string_value | uint_value |
float_value |
+-----------+------------+---------+--------------+------------+-------------+
| 182 | 1504 | 4 | NULL | 2109
| NULL |
+-----------+------------+---------+--------------+------------+-------------+On 1/30/15 9:58 AM, Robert Vojcik wrote:
Hi, SW is paired with racktables dictionary, make sure that your
racktables have your system in dictionary.
Racktables->Configuration->Dictionary-server OS type—
Reply to this email directly or view it on GitHub
#6 (comment).Brian Smith| System Administrator II |Information & Media
Technology|Full Sail UniversityT407.462.3303
Brian Smith| System Administrator II |Information & Media
Technology|Full Sail University
T407.462.3303
from rt-server-client.
Looks like script is looking for string 'Ubuntu trusty', not Ubuntu 14.04 LTS.
Just try to add 'Ubuntu%GSKIP%Ubuntu trusty' for test. If it will work we can make some exeption for Ubuntu and change search string.
from rt-server-client.
Yes I was thinking instead of os_codename use os_version for the search
it might work as well.
On 1/30/15 10:09 AM, Robert Vojcik wrote:
Looks like script is looking for string 'Ubuntu trusty', not Ubuntu
14.04 LTS.Just try to add 'Ubuntu%GSKIP%Ubuntu trusty' for test. If it will work
we can make some exeption for Ubuntu and change search string.—
Reply to this email directly or view it on GitHub
#6 (comment).
Brian Smith| System Administrator II |Information & Media
Technology|Full Sail University
T407.462.3303
from rt-server-client.
Can you test it please ?
from rt-server-client.
I get the same error as if I change the check to os_version. Here's the
test results:
mysql> UPDATE Dictionary SET dict_value = 'Ubuntu%GSKIP%Ubuntu trusty'
where dict_key = 2109;
Query OK, 1 row affected (0.06 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select * from Dictionary where dict_value like 'Ubuntu%';
+------------+----------+-------------+-------------------------------+
| chapter_id | dict_key | dict_sticky | dict_value |
+------------+----------+-------------+-------------------------------+
| 13 | 1704 | yes | Ubuntu%GSKIP%Ubuntu 10.04 LTS |
| 13 | 1705 | yes | Ubuntu%GSKIP%Ubuntu 10.10 |
| 13 | 1706 | yes | Ubuntu%GSKIP%Ubuntu 11.04 |
| 13 | 1707 | yes | Ubuntu%GSKIP%Ubuntu 11.10 |
| 13 | 1708 | yes | Ubuntu%GSKIP%Ubuntu 12.04 LTS |
| 13 | 1813 | yes | Ubuntu%GSKIP%Ubuntu 12.10 |
| 13 | 2107 | yes | Ubuntu%GSKIP%Ubuntu 13.04 |
| 13 | 2108 | yes | Ubuntu%GSKIP%Ubuntu 13.10 |
| 13 | 428 | yes | Ubuntu%GSKIP%Ubuntu 4.10 |
| 13 | 429 | yes | Ubuntu%GSKIP%Ubuntu 5.04 |
| 13 | 430 | yes | Ubuntu%GSKIP%Ubuntu 5.10 |
| 13 | 431 | yes | Ubuntu%GSKIP%Ubuntu 6.06 LTS |
| 13 | 432 | yes | Ubuntu%GSKIP%Ubuntu 6.10 |
| 13 | 433 | yes | Ubuntu%GSKIP%Ubuntu 7.04 |
| 13 | 434 | yes | Ubuntu%GSKIP%Ubuntu 7.10 |
| 13 | 435 | yes | Ubuntu%GSKIP%Ubuntu 8.04 LTS |
| 13 | 796 | yes | Ubuntu%GSKIP%Ubuntu 8.10 |
| 13 | 1054 | yes | Ubuntu%GSKIP%Ubuntu 9.04 |
| 13 | 1320 | yes | Ubuntu%GSKIP%Ubuntu 9.10 |
| 13 | 2109 | yes | Ubuntu%GSKIP%Ubuntu trusty |
+------------+----------+-------------+-------------------------------+
20 rows in set (0.00 sec)
mysql> \q
Bye
root@wpkfl-fs-racktables:/opt/rt-server-client# ./system-info.py
Traceback (most recent call last):
File "./system-info.py", line 824, in
InsertAttribute(object_id,server_type_id,attr_id,"NULL",os_id,hostname)
File "./system-info.py", line 377, in InsertAttribute
dbresult.execute(sql)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174,
in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line
36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.IntegrityError: (1062, "Duplicate entry '182-4' for
key 'PRIMARY'")
On 1/30/15 10:49 AM, Robert Vojcik wrote:
Can you test it please ?
—
Reply to this email directly or view it on GitHub
#6 (comment).
Brian Smith| System Administrator II |Information & Media
Technology|Full Sail University
T407.462.3303
from rt-server-client.
That was with the value already set, If I remove it and run I get:
root@wpkfl-fs-racktables:/opt/rt-server-client# ./system-info.py
Traceback (most recent call last):
File "./system-info.py", line 824, in
InsertAttribute(object_id,server_type_id,attr_id,"NULL",os_id,hostname)
File "./system-info.py", line 377, in InsertAttribute
dbresult.execute(sql)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174,
in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line
36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.IntegrityError: (1062, "Duplicate entry '182-4' for
key 'PRIMARY'")
root@wpkfl-fs-racktables:/opt/rt-server-client# ./system-info.py
Traceback (most recent call last):
File "./system-info.py", line 824, in
InsertAttribute(object_id,server_type_id,attr_id,"NULL",os_id,hostname)
File "./system-info.py", line 377, in InsertAttribute
dbresult.execute(sql)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174,
in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line
36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.IntegrityError: (1452, 'Cannot add or update a child
row: a foreign key constraint fails (racktables_db
.AttributeValue
,
CONSTRAINT AttributeValue-FK-object
FOREIGN KEY (object_id
,
object_tid
) REFERENCES Object
(id
, objtype_id
) ON DELETE CASCADE
ON UPDATE CASCADE)')
On 1/30/15 11:02 AM, Brian Smith wrote:
I get the same error as if I change the check to os_version. Here's
the test results:mysql> UPDATE Dictionary SET dict_value = 'Ubuntu%GSKIP%Ubuntu trusty'
where dict_key = 2109;
Query OK, 1 row affected (0.06 sec)
Rows matched: 1 Changed: 1 Warnings: 0mysql> select * from Dictionary where dict_value like 'Ubuntu%';
+------------+----------+-------------+-------------------------------+
| chapter_id | dict_key | dict_sticky | dict_value |
+------------+----------+-------------+-------------------------------+
| 13 | 1704 | yes | Ubuntu%GSKIP%Ubuntu 10.04 LTS |
| 13 | 1705 | yes | Ubuntu%GSKIP%Ubuntu 10.10 |
| 13 | 1706 | yes | Ubuntu%GSKIP%Ubuntu 11.04 |
| 13 | 1707 | yes | Ubuntu%GSKIP%Ubuntu 11.10 |
| 13 | 1708 | yes | Ubuntu%GSKIP%Ubuntu 12.04 LTS |
| 13 | 1813 | yes | Ubuntu%GSKIP%Ubuntu 12.10 |
| 13 | 2107 | yes | Ubuntu%GSKIP%Ubuntu 13.04 |
| 13 | 2108 | yes | Ubuntu%GSKIP%Ubuntu 13.10 |
| 13 | 428 | yes | Ubuntu%GSKIP%Ubuntu 4.10 |
| 13 | 429 | yes | Ubuntu%GSKIP%Ubuntu 5.04 |
| 13 | 430 | yes | Ubuntu%GSKIP%Ubuntu 5.10 |
| 13 | 431 | yes | Ubuntu%GSKIP%Ubuntu 6.06 LTS |
| 13 | 432 | yes | Ubuntu%GSKIP%Ubuntu 6.10 |
| 13 | 433 | yes | Ubuntu%GSKIP%Ubuntu 7.04 |
| 13 | 434 | yes | Ubuntu%GSKIP%Ubuntu 7.10 |
| 13 | 435 | yes | Ubuntu%GSKIP%Ubuntu 8.04 LTS |
| 13 | 796 | yes | Ubuntu%GSKIP%Ubuntu 8.10 |
| 13 | 1054 | yes | Ubuntu%GSKIP%Ubuntu 9.04 |
| 13 | 1320 | yes | Ubuntu%GSKIP%Ubuntu 9.10 |
| 13 | 2109 | yes | Ubuntu%GSKIP%Ubuntu trusty |
+------------+----------+-------------+-------------------------------+
20 rows in set (0.00 sec)mysql> \q
Bye
root@wpkfl-fs-racktables:/opt/rt-server-client# ./system-info.py
Traceback (most recent call last):
File "./system-info.py", line 824, in
InsertAttribute(object_id,server_type_id,attr_id,"NULL",os_id,hostname)
File "./system-info.py", line 377, in InsertAttribute
dbresult.execute(sql)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line
174, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line
36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.IntegrityError: (1062, "Duplicate entry '182-4' for
key 'PRIMARY'")On 1/30/15 10:49 AM, Robert Vojcik wrote:
Can you test it please ?
—
Reply to this email directly or view it on GitHub
#6 (comment).Brian Smith| System Administrator II |Information & Media
Technology|Full Sail UniversityT407.462.3303
Brian Smith| System Administrator II |Information & Media
Technology|Full Sail University
T407.462.3303
from rt-server-client.
It seems the object_tid when the script runs is set to 4 but in the db
is 1504 (If I set it manually through racktables). Looking deeper now
but think I'm in the right direction to fix.
On 1/30/15 10:49 AM, Robert Vojcik wrote:
Can you test it please ?
—
Reply to this email directly or view it on GitHub
#6 (comment).
Brian Smith| System Administrator II |Information & Media
Technology|Full Sail University
T407.462.3303
from rt-server-client.
I'm working on it. Preparing big new update using racktables api. You should try testing version in testing branch.
Clone project, then git checkout testing ; git submodule init ; git submodule update
from rt-server-client.
OK, now I had same error, it's related with latest version of racktables, maybe some changes in db structure.
from rt-server-client.
Seems if the host exists but the os version is not the same it tries to
add a new record rather than updating it to the correct os version
causing a duplicate entry which fails. problem line is
if os_id != None:
InsertAttribute(object_id,server_type_id,attr_id,"NULL",os_id,hostname)
On 1/30/15 3:42 PM, Robert Vojcik wrote:
OK, now I had same error, it's related with latest version of
racktables, maybe some changes in db structure.—
Reply to this email directly or view it on GitHub
#6 (comment).
Brian Smith| System Administrator II |Information & Media
Technology|Full Sail University
T407.462.3303
from rt-server-client.
Ok I will try that.
On 1/30/15 3:25 PM, Robert Vojcik wrote:
I'm working on it. Preparing big new update using racktables api. You
should try testing version in testing branch.Clone project, then git checkout testing ; git submodule init ; git
submodule update—
Reply to this email directly or view it on GitHub
#6 (comment).
Brian Smith| System Administrator II |Information & Media
Technology|Full Sail University
T407.462.3303
from rt-server-client.
Ok I think I have solution. In new version of racktables there is relation between attributes and attribute map.
So you have to Map our new attributes to Server and VM. (in configuration->Attributes->Map)
When you assign attributes to object type it works.
In few next days I will prepare new update of rt-server-client to latest racktables.
from rt-server-client.
Which attributes are you setting there?
On 1/30/15 4:00 PM, Robert Vojcik wrote:
Ok I think I have solution. In new version of racktables there is
relation between attributes and attribute map.So you have to Map our new attributes to Server and VM. (in
configuration->Attributes->Map)
When you assign attributes to object type it works.In few next days I will prepare new update of rt-server-client to
latest racktables.—
Reply to this email directly or view it on GitHub
#6 (comment).
Brian Smith| System Administrator II |Information & Media
Technology|Full Sail University
T407.462.3303
from rt-server-client.
INSERT INTO Attribute
(type, name) VALUES
('string','HW support type'),
('string','CPU Model'),
('string','RAM Model'),
('uint','CPUs Logical'),
('uint','CPUs'),
('uint','Cores per CPU'),
('uint','RAM Mem, MB');
from rt-server-client.
Related Issues (17)
- lsb-release not avaible on freebsd HOT 4
- Missing attributes in database
- ToolBox is missing HOT 1
- base missing in /rt-server-client/lib/Toolbox HOT 2
- NameError: name 'init_run' is not defined HOT 1
- /opt/server-audit/get-bios-ident.py missing HOT 4
- Problem with first installation HOT 7
- Hostname <> already exist. I'm using service tag: ERROR: Problem during executing dmidecode HOT 1
- DB Insertion Fails Foreign Key Constraint HOT 8
- Support for Python3 HOT 1
- I get SyntaxError: invalid syntax HOT 4
- Redisign to use python-pip HOT 1
- Refactoring the code HOT 1
- Usage with VM HOT 1
- Virtualization: KVM Support HOT 1
- Code optimalization, debug HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rt-server-client.