retrive service error

Bug #1726830 reported by suzhengwei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Invalid
Undecided
suzhengwei

Bug Description

In multi controller nodes, it raise exception when retrive service,

# watcher service list
Exception raised: Multiple rows were found for one() (HTTP 500)

Then I check the database,
MariaDB [watcher]> select * from services;
+---------------------+---------------------+------------+---------+----+-------------------------+--------------+---------------------+
| created_at | updated_at | deleted_at | deleted | id | name | host | last_seen_up |
+---------------------+---------------------+------------+---------+----+-------------------------+--------------+---------------------+
| 2017-10-23 09:50:14 | 2017-10-24 09:37:25 | NULL | 0 | 3 | watcher-applier | controller01 | 2017-10-24 09:37:25 |
| 2017-10-23 09:50:16 | 2017-10-24 09:37:33 | NULL | 0 | 6 | watcher-applier | controller02 | 2017-10-24 09:37:33 |
| 2017-10-23 09:50:18 | 2017-10-24 09:37:16 | NULL | 0 | 9 | watcher-applier | controller03 | 2017-10-24 09:37:16 |
| 2017-10-24 03:10:50 | 2017-10-24 09:37:27 | NULL | 0 | 12 | watcher-decision-engine | controller01 | 2017-10-24 09:37:27 |
| 2017-10-24 03:24:58 | 2017-10-24 09:37:35 | NULL | 0 | 15 | watcher-decision-engine | controller02 | 2017-10-24 09:37:35 |
| 2017-10-24 03:25:05 | 2017-10-24 09:37:17 | NULL | 0 | 18 | watcher-decision-engine | controller03 | 2017-10-24 09:37:17 |
+---------------------+---------------------+------------+---------+----+-------------------------+--------------+---------------------+
6 rows in set (0.00 sec)

So, I find the reason. In multi controller nodes, there would be duplicate services for watcher, and the name is not unique, so it will raise exception when calling the Watcher service APIs.

suzhengwei (sue.sam)
Changed in watcher:
assignee: nobody → sue (sue.sam)
description: updated
suzhengwei (sue.sam)
Changed in watcher:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.