cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Several non-existent management servers

Open tobzsc opened this issue 1 year ago • 14 comments

ISSUE TYPE
  • Bug Report
COMPONENT NAME
UI
CLOUDSTACK VERSION
4.18.0.0
4.18.1.0
CONFIGURATION

Nothing special as this seems not to be configuration related.

OS / ENVIRONMENT

N/A

SUMMARY

After an update from 4.18.0.0 to 4.18.1.0 we noticed that we have several management servers in down state under /client/#/managementserver. We only have one management server and would expect there to be only one single server. Also see the picuture.

mgmt-servers

STEPS TO REPRODUCE
I do not have an idea how to reproduce this.
EXPECTED RESULTS

ACTUAL RESULTS

tobzsc avatar Jan 16 '24 11:01 tobzsc

Thanks for opening your first issue here! Be sure to follow the issue template!

boring-cyborg[bot] avatar Jan 16 '24 11:01 boring-cyborg[bot]

@tobzsc These are possibly due to stale entries in the mshost table, can you check:

select id,msid,name,state,version,service_ip,last_update,removed from mshost;

rajujith avatar Jan 16 '24 12:01 rajujith

mysql> select id,msid,name,state,version,service_ip,last_update,removed from mshost;
+----+-----------------+----------------------+-------+----------+------------+---------------------+---------------------+
| id | msid            | name                 | state | version  | service_ip | last_update         | removed             |
+----+-----------------+----------------------+-------+----------+------------+---------------------+---------------------+
|  1 | 139438635443863 | mgmt01.cloud.asdf.com | Down  | 4.18.0.0 | 10.100.0.1 | 2023-07-21 11:53:53 | 2023-07-28 22:16:49 |
|  2 | 195765048550806 | mgmt01.cloud.asdf.com | Down  | 4.18.0.0 | 10.100.0.1 | 2023-07-24 15:58:55 | 2023-07-28 22:17:01 |
|  3 |  95390881156670 | mgmt01.cloud.asdf.com | Down  | 4.18.0.0 | 10.100.0.1 | 2023-07-27 11:01:36 | 2023-07-28 22:17:03 |
|  4 |  50929507305524 | mgmt01.cloud.asdf.com | Down  | 4.18.0.0 | 10.100.0.1 | 2023-07-31 12:42:19 | NULL                |
|  5 |  55476218781091 | mgmt01.cloud.asdf.com | Down  | 4.18.0.0 | 10.100.0.1 | 2023-08-02 13:20:40 | NULL                |
|  6 | 182968675161706 | mgmt01.cloud.asdf.com | Down  | 4.18.1.0 | 10.100.0.1 | 2023-11-10 10:31:58 | NULL                |
|  7 | 209385682338933 | mgmt01.cloud.asdf.com | Down  | 4.18.1.0 | 10.100.0.1 | 2023-11-13 14:03:35 | NULL                |
|  8 | 204860996050848 | mgmt01.cloud.asdf.com | Down  | 4.18.1.0 | 10.100.0.1 | 2023-11-29 12:56:24 | NULL                |
|  9 | 279468430192113 | mgmt01.cloud.asdf.com | Down  | 4.18.1.0 | 10.100.0.1 | 2023-11-29 15:38:39 | NULL                |
| 10 |  12007795354167 | mgmt01.cloud.asdf.com | Down  | 4.18.1.0 | 10.100.0.1 | 2023-12-04 15:18:33 | NULL                |
| 11 |  46291004457368 | mgmt01.cloud.asdf.com | Down  | 4.18.1.0 | 10.100.0.1 | 2023-12-04 15:28:39 | NULL                |
| 12 | 143822807052936 | mgmt01.cloud.asdf.com | Down  | 4.18.1.0 | 10.100.0.1 | 2023-12-04 15:41:48 | NULL                |
| 13 | 187737961497700 | mgmt01.cloud.asdf.com | Down  | 4.18.1.0 | 10.100.0.1 | 2023-12-05 10:09:17 | NULL                |
| 14 | 103509587851758 | mgmt01.cloud.asdf.com | Down  | 4.18.1.0 | 10.100.0.1 | 2023-12-05 13:39:14 | NULL                |
| 15 | 266940830264052 | mgmt01.cloud.asdf.com | Up    | 4.18.1.0 | 10.100.0.1 | 2024-01-16 12:23:36 | NULL                |
+----+-----------------+----------------------+-------+----------+------------+---------------------+---------------------+
15 rows in set (0.00 sec)

From my understanding I should set all other entries to removed except the one which is active.

tobzsc avatar Jan 16 '24 12:01 tobzsc

From my understanding I should set all other entries to removed except the one which is active.

Yes.

rajujith avatar Jan 16 '24 12:01 rajujith

That fixed the issue. But still we don't know why it happened.

tobzsc avatar Jan 16 '24 12:01 tobzsc

@tobzsc , I am not sure, but this might be due to breaking an operation half way, i.e. start and stop repeatedly ?

DaanHoogland avatar Jan 16 '24 13:01 DaanHoogland

That fixed the issue. But still we don't know why it happened.

@tobzsc is the mac address changed frequently

weizhouapache avatar Jan 16 '24 14:01 weizhouapache

MAC address was never changed. We are not using DHCP.

tobzsc avatar Jan 16 '24 15:01 tobzsc

We should be able to classify this as a bug - so CloudStack shouldn't create duplicates in mshost table.

rohityadavcloud avatar Feb 08 '24 18:02 rohityadavcloud

If we don't know why it happened and how to reproduce we can not classify it as a bug @rohityadavcloud

DaanHoogland avatar Feb 12 '24 08:02 DaanHoogland

@tobzsc can you share the /etc/hosts file ? if /etc/hosts is updated, the host is resolved as different IPs (127.0.0.1, or 127.0.1.1, or host IP), cloudstack will consider it as a new management server.

weizhouapache avatar Feb 12 '24 14:02 weizhouapache

Of course. Here you are:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

We do not have more in it.

tobzsc avatar Feb 14 '24 10:02 tobzsc

Of course. Here you are:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

We do not have more in it.

Can you add a record for your server?

'ServerIP hostname'

weizhouapache avatar Feb 14 '24 11:02 weizhouapache

Yes, we can add it. We will check with the next update if the problem is solved and get back to you.

tobzsc avatar Feb 21 '24 12:02 tobzsc

I think this is fixed by https://github.com/apache/cloudstack/pull/8988 and same as https://github.com/apache/cloudstack/issues/8174

Closing, pl test 4.19.1.0 when it is released in future, or try the nightlies http://download.cloudstack.org/testing/nightly/latest/

If you still get this issue, pl re-open this issue or log a new one. Thanks.

rohityadavcloud avatar Apr 30 '24 12:04 rohityadavcloud