Skip to contentSkip to conversation

qapi/migration.json: Fix documentation issue about query_colo_status

PATCH Markus Armbruster 2 participants 4 messages Apr 2, 2019 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 15 lines · Zhang Chen

From: Zhang Chen <[email protected]>

The documentation with the wrong initial version number of last_mode field, This patch just fix this issue.

---
 qapi/migration.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qapi/migration.json +0 -0
index cfde29acf8..798c6ac2df 100644

qapi/migration.json line 1388

Quoted 8 lines
qapi/migration.json +1 -1
@@ -1382,7 +1382,7 @@
 #
 # @last_mode: COLO last running mode. If COLO is running, this field
 #             will return same like mode field, after failover we can
-#             use this field to get last colo mode. (since 4.1)
+#             use this field to get last colo mode. (since 4.0)
 #
 # @reason: describes the reason for the COLO exit.
 #

What's the excuse for spelling last_mode with '_' instead of '-'?

Any objection to changing it to last-mode?

#2 lore raw
Quoted 40 lines

-----Original Message-----
From: Markus Armbruster [mailto:[email protected]]
Sent: Tuesday, April 2, 2019 2:20 PM
To: Zhang, Chen <[email protected]>
Cc: Zhang Chen <[email protected]>; Dr. David Alan Gilbert <[email protected]>; Juan Quintela <[email protected]>; zhanghailiang <[email protected]>; Eric Blake <[email protected]>; qemu- dev <[email protected]>; Zhang, Chen <[email protected]>
Subject: Re: [Qemu-devel] [PATCH] qapi/migration.json: Fix documentation issue about query_colo_status

Quoted 15 lines · Zhang Chen

From: Zhang Chen <[email protected]>

The documentation with the wrong initial version number of last_mode field, This patch just fix this issue.

---
 qapi/migration.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qapi/migration.json index renamed from qapi/migration.json +0 -0

cfde29acf8..798c6ac2df 100644

qapi/migration.json line 1388

Quoted 8 lines
qapi/migration.json +1 -1
@@ -1382,7 +1382,7 @@
 #
 # @last_mode: COLO last running mode. If COLO is running, this field
 #             will return same like mode field, after failover we can
-#             use this field to get last colo mode. (since 4.1)
+#             use this field to get last colo mode. (since 4.0)
 #
 # @reason: describes the reason for the COLO exit.
 #

What's the excuse for spelling last_mode with '_' instead of '-'?

Quoted 1 line

Any objection to changing it to last-mode?

No, I just found in migration.json have both '_' and '-', for example "migrate_cancel" and "migrate-continue". If you think we should use the '-' format in this migration.qapi file, I will send a patch to change all command format to the '-'.

Thanks
Zhang Chen

#3 lore raw
Quoted 39 lines · Chen
Quoted 39 lines

-----Original Message-----
From: Markus Armbruster [mailto:[email protected]]
Sent: Tuesday, April 2, 2019 2:20 PM
To: Zhang, Chen <[email protected]>
Cc: Zhang Chen <[email protected]>; Dr. David Alan Gilbert <[email protected]>; Juan Quintela <[email protected]>; zhanghailiang <[email protected]>; Eric Blake <[email protected]>; qemu- dev <[email protected]>; Zhang, Chen <[email protected]>
Subject: Re: [Qemu-devel] [PATCH] qapi/migration.json: Fix documentation issue about query_colo_status

Quoted 15 lines · Zhang Chen

From: Zhang Chen <[email protected]>

The documentation with the wrong initial version number of last_mode field, This patch just fix this issue.

---
 qapi/migration.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qapi/migration.json index renamed from qapi/migration.json +0 -0

cfde29acf8..798c6ac2df 100644

qapi/migration.json line 1388

Quoted 8 lines
qapi/migration.json +1 -1
@@ -1382,7 +1382,7 @@
 #
 # @last_mode: COLO last running mode. If COLO is running, this field
 #             will return same like mode field, after failover we can
-#             use this field to get last colo mode. (since 4.1)
+#             use this field to get last colo mode. (since 4.0)
 #
 # @reason: describes the reason for the COLO exit.
 #

What's the excuse for spelling last_mode with '_' instead of '-'?

Quoted 4 lines
Quoted 1 line

Any objection to changing it to last-mode?

No, I just found in migration.json have both '_' and '-', for example "migrate_cancel" and "migrate-continue". If you think we should use the '-' format in this migration.qapi file, I will send a patch to change all command format to the '-'.

Quote docs/devel/qapi-code-gen.txt:

Command names, and member names within a type, should be all lower case with words separated by a hyphen. However, some existing older commands and complex types use underscore; when extending such expressions, consistency is preferred over blindly avoiding underscore.

The consistency argument doesn't apply here.

I'd prefer to have this cleaned up, and I'd prefer to have it done in -rc2. If I see a patch from you before I do my pull request, I'll use it, otherweise I'll patch it myself.

#4 lore raw
Quoted 70 lines

-----Original Message-----
From: Markus Armbruster [mailto:[email protected]]
Sent: Tuesday, April 2, 2019 4:37 PM
To: Zhang, Chen <[email protected]>
Cc: Markus Armbruster <[email protected]>; zhanghailiang <[email protected]>; Juan Quintela <[email protected]>; qemu-dev <[email protected]>; Dr. David Alan Gilbert <[email protected]>; Zhang Chen <[email protected]>
Subject: Re: [Qemu-devel] [PATCH] qapi/migration.json: Fix documentation issue about query_colo_status

Quoted 40 lines · Chen
Quoted 40 lines

-----Original Message-----
From: Markus Armbruster [mailto:[email protected]]
Sent: Tuesday, April 2, 2019 2:20 PM
To: Zhang, Chen <[email protected]>
Cc: Zhang Chen <[email protected]>; Dr. David Alan Gilbert <[email protected]>; Juan Quintela <[email protected]>; zhanghailiang <[email protected]>; Eric Blake <[email protected]>; qemu- dev <[email protected]>; Zhang, Chen <[email protected]>
Subject: Re: [Qemu-devel] [PATCH] qapi/migration.json: Fix documentation issue about query_colo_status

Quoted 15 lines · Zhang Chen

From: Zhang Chen <[email protected]>

The documentation with the wrong initial version number of last_mode field, This patch just fix this issue.

---
 qapi/migration.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qapi/migration.json index renamed from qapi/migration.json +0 -0

cfde29acf8..798c6ac2df 100644

qapi/migration.json line 1388

Quoted 8 lines
qapi/migration.json +1 -1
@@ -1382,7 +1382,7 @@
 #
 # @last_mode: COLO last running mode. If COLO is running, this field
 #             will return same like mode field, after failover we can
-#             use this field to get last colo mode. (since 4.1)
+#             use this field to get last colo mode. (since 4.0)
 #
 # @reason: describes the reason for the COLO exit.
 #

What's the excuse for spelling last_mode with '_' instead of '-'?

Quoted 3 lines
Quoted 1 line

Any objection to changing it to last-mode?

No, I just found in migration.json have both '_' and '-', for example

"migrate_cancel" and "migrate-continue".

Quoted 1 line

If you think we should use the '-' format in this migration.qapi file, I will send

a patch to change all command format to the '-'.

Quote docs/devel/qapi-code-gen.txt:

Command names, and member names within a type, should be all lower case with words separated by a hyphen. However, some existing older commands and complex types use underscore; when extending such expressions, consistency is preferred over blindly avoiding underscore.

Quoted 5 lines

The consistency argument doesn't apply here.

I'd prefer to have this cleaned up, and I'd prefer to have it done in -rc2. If I see a patch from you before I do my pull request, I'll use it, otherweise I'll patch it myself.

Hi Markus,

I have sent a patch for this issue, please pick up it. [PATCH] qapi/migration.json: Clean up for COLOStatus

Thanks
Zhang Chen