Please add t-mavericks-r5-002 and t-mavericks-r5-003 to graphserver

RESOLVED FIXED

Status

task
RESOLVED FIXED
5 years ago
a year ago

People

(Reporter: philor, Assigned: jhopkins)

Tracking

Details

Attachments

(1 attachment)

Reporter

Description

5 years ago
Since they were created in January, they've failed every talos job they've taken because graphserver refuses to talk to strangers.
Assignee

Updated

5 years ago
Blocks: 932431
Assignee

Comment 1

5 years ago
Assignee: nobody → jhopkins
Status: NEW → ASSIGNED
Attachment #8400743 - Flags: review?(bugspam.Callek)
Assignee

Comment 2

5 years ago
Callek: when you've reviewed this patch, can you please execute the SQL against staging and production databases? (i'll be ooto til monday)
Comment on attachment 8400743 [details] [diff] [review]
[graphs] proposed patch

Review of attachment 8400743 [details] [diff] [review]:
-----------------------------------------------------------------

not a fan of explicit ID in insert into os_list here, I have it on good authority the data.sql is out of date right now, please use NULL.

So when you execute you'd do:
insert into os_list values (NULL, "MacOSX 10.9");
SET last_os_id = last_insert_id();

insert into machines values (NULL,last_os_id,0,"2.0","t-mavericks-r5-002",1,unix_timestamp());
insert into machines values (NULL,last_os_id,0,"2.0","t-mavericks-r5-003",1,unix_timestamp());
Attachment #8400743 - Flags: review?(bugspam.Callek) → review+
Flags: needinfo?(bugspam.Callek)
os_list value was present, my SET for variable didn't work (misremembered syntax). anyway, heres my SQL data as entered.  I'll leave it up  to you to checkin the data.sql or not.

mysql> select * from os_list where name LIKE "MacOSX%";
+----+----------------------+
| id | name                 |
+----+----------------------+
|  7 | MacOSX 10.5.2        |
| 13 | MacOSX 10.5.8        |
| 21 | MacOSX 10.6 (rev4)   |
| 17 | MacOSX 10.6.2 (rev3) |
| 22 | MacOSX 10.7          |
| 24 | MacOSX 10.8          |
| 39 | MacOSX 10.9          |
|  3 | MacOSX Darwin 8.8.1  |
|  4 | MacOSX Darwin 9.2.2  |
+----+----------------------+
9 rows in set (0.00 sec)

mysql> select * from machines where name LIKE "t-mavericks%";
+------+-------+---------------+-----------+--------------------+-----------+------------+
| id   | os_id | is_throttling | cpu_speed | name               | is_active | date_added |
+------+-------+---------------+-----------+--------------------+-----------+------------+
| 8977 |    39 |             0 | 2.0       | t-mavericks-r5-001 |         1 | 1378895038 |
+------+-------+---------------+-----------+--------------------+-----------+------------+
1 row in set (0.00 sec)

mysql> SET last_os_id=39;
ERROR 1193 (HY000): Unknown system variable 'last_os_id'
mysql> insert into machines values (NULL,39,0,"2.0","t-mavericks-r5-002",1,unix_timestamp());
Query OK, 1 row affected (0.01 sec)

mysql> insert into machines values (NULL,39,0,"2.0","t-mavericks-r5-003",1,unix_timestamp());
Query OK, 1 row affected (0.00 sec)

mysql> select * from machines where name LIKE "t-mavericks%";
+------+-------+---------------+-----------+--------------------+-----------+------------+
| id   | os_id | is_throttling | cpu_speed | name               | is_active | date_added |
+------+-------+---------------+-----------+--------------------+-----------+------------+
| 8977 |    39 |             0 | 2.0       | t-mavericks-r5-001 |         1 | 1378895038 |
| 9451 |    39 |             0 | 2.0       | t-mavericks-r5-002 |         1 | 1396539117 |
| 9453 |    39 |             0 | 2.0       | t-mavericks-r5-003 |         1 | 1396539123 |
+------+-------+---------------+-----------+--------------------+-----------+------------+
3 rows in set (0.01 sec)
Flags: needinfo?(bugspam.Callek)
Assignee

Comment 6

5 years ago
> not a fan of explicit ID in insert into os_list here, I have it on good authority the data.sql is out of date right now, please use NULL.

I think data.sql should use explicit IDs rather than rely on the generator values.  Otherwise, if we needed to recreate the database using data.sql the IDs would change (due to the gaps in IDs) and break the foreign key relationships.

I would also question the need for data.sql at all, when a database backup will give us the same thing with less overhead.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Updated

a year ago
Product: Release Engineering → Infrastructure & Operations
You need to log in before you can comment on or make changes to this bug.