{"id":67,"date":"2026-10-27T12:00:37","date_gmt":"2026-10-27T20:00:37","guid":{"rendered":"\/?p=67"},"modified":"2026-10-27T12:00:37","modified_gmt":"2026-10-27T20:00:37","slug":"post-mvq5qx7k","status":"publish","type":"post","link":"https:\/\/www.woiov.cn\/?p=67","title":{"rendered":"v7.20.5\uff1a\u4e00\u4e2a\u7a7a\u5b57\u7b26\u4e32\uff0c\u8ba9\u7528\u6237\u770b\u4e0d\u89c1\u81ea\u5df1\u521a\u4e70\u7684\u670d\u52a1\u5668"},"content":{"rendered":"<h3>\u73b0\u8c61\uff1a\u94b1\u4ed8\u4e86\uff0c\u673a\u5668\u5728\u8dd1\uff0c\u5217\u8868\u662f\u7a7a\u7684<\/h3>\n<p>\u7528\u6237\u53d1\u6765\u622a\u56fe\uff1a<code>\u6211\u7684\u670d\u52a1\u5668<\/code> \u9875\u9762\u5e72\u51c0\u5f97\u50cf\u65b0\u53f7\u2014\u2014&#8221;\u8fd8\u6ca1\u6709\u670d\u52a1\u5668\uff0c\u8d2d\u4e70\u5957\u9910\u540e\uff0c\u673a\u5668\u4f1a\u5728 2-4 \u5206\u949f\u5185\u81ea\u52a8\u521b\u5efa&#8221;\u3002<\/p>\n<p>\u4f46\u4ed6\u7684\u8ba2\u5355\u662f\u771f\u7684\uff1a<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>\u68c0\u67e5\u9879<\/th>\n<th>\u7ed3\u679c<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u8ba2\u5355\u72b6\u6001<\/td>\n<td><code>active<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u652f\u4ed8\u65f6\u95f4<\/td>\n<td>02:05:07<\/td>\n<\/tr>\n<tr>\n<td>\u5f00\u901a\u5b8c\u6210<\/td>\n<td>02:07:47\uff08\u516d\u4e2a\u9636\u6bb5\u5168 done\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u5bb9\u5668 212<\/td>\n<td><code>running<\/code>\uff0chostname <code>lihua-dwma9h<\/code><\/td>\n<\/tr>\n<tr>\n<td>\u5bb9\u5668\u914d\u7f6e<\/td>\n<td>2C \/ 1G \/ 10G\uff0c\u7f51\u7edc\u5df2 DHCP \u8d77\u6765<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u673a\u5668\u6d3b\u7740\uff0c\u8ba2\u5355\u6709\u6548\uff0c\u4ea4\u4ed8\u6d41\u7a0b\u4e00\u6b65\u6ca1\u6f0f\u3002<strong>\u552f\u72ec\u7528\u6237\u7684\u5217\u8868\u91cc\u6ca1\u6709\u5b83\u3002<\/strong><\/p>\n<p>\u8fd9\u7c7b\u95ee\u9898\u6700\u5bb9\u6613\u88ab\u8bef\u5224\u6210&#8221;\u7f13\u5b58&#8221;\u6216&#8221;\u524d\u7aef\u6ca1\u5237\u65b0&#8221;\uff0c\u4f46\u7f13\u5b58\u89e3\u91ca\u4e0d\u4e86\u4e00\u4e2a\u7a33\u5b9a\u590d\u73b0\u7684\u7a7a\u5217\u8868\u3002\u4e8e\u662f\u5f80\u4e0b\u6316\u6570\u636e\u3002<\/p>\n<h3>\u6392\u67e5\uff1a\u4e09\u5c42\u6570\u636e\uff0c\u95ee\u9898\u51fa\u5728\u7b2c\u4e09\u5c42<\/h3>\n<p>\u5f00\u901a\u4ea4\u4ed8\u8fd9\u6761\u94fe\u8def\u4e0a\uff0c\u673a\u5668\u4fe1\u606f\u5b58\u5728\u4e09\u4e2a\u5730\u65b9\uff1a<\/p>\n<p>1. <strong>\u8ba2\u5355<\/strong>\uff08<code>orders.json<\/code>\uff09\u2014\u2014\u4ea4\u6613\u51ed\u8bc1\uff0c\u542b <code>items[].vmid<\/code><\/p>\n<p>2. <strong>PVE<\/strong>\u2014\u2014\u771f\u5b9e\u5bb9\u5668\uff0c<code>pct status 212<\/code> \u8fd4\u56de running<\/p>\n<p>3. <strong>\u5f52\u5c5e\u8868<\/strong>\uff08<code>ownership.json<\/code>\uff09\u2014\u2014&#8221;\u8fd9\u53f0\u673a\u5668\u5c5e\u4e8e\u8c01&#8221;\uff0c\u524d\u7aef\u5217\u8868\u5c31\u662f\u6309\u5b83\u7b5b\u7684<\/p>\n<p>\u524d\u4e24\u5c42\u90fd\u5bf9\u3002\u7b2c\u4e09\u5c42\uff1a<\/p>\n<pre class=\"wp-block-code\"><code>\n\"212\": {\n  \"userId\": \"\",\n  \"username\": \"lllxz9\",\n  \"assignedAt\": \"2026-10-27T02:07:47.969Z\",\n  \"by\": \"shop\"\n}\n<\/code><\/pre>\n<p><code>userId<\/code> \u662f<strong>\u7a7a\u5b57\u7b26\u4e32<\/strong>\u3002\u800c\u540c\u6587\u4ef6\u91cc\u5176\u4ed6\u516d\u53f0\u7684\u8bb0\u5f55\u90fd\u957f\u8fd9\u6837\uff1a<\/p>\n<pre class=\"wp-block-code\"><code>\n\"101\": {\n  \"userId\": \"a4417f6d2682874cmv3sqobe\",\n  \"username\": \"admin\",\n  ...\n}\n<\/code><\/pre>\n<p>\u5dee\u522b\u4e00\u76ee\u4e86\u7136\uff1a<strong>\u624b\u5de5\u7ed1\u7684\u6709 id\uff0c\u4e0b\u5355\u81ea\u52a8\u7ed1\u7684\u6ca1\u6709\u3002<\/strong><\/p>\n<h3>\u6839\u56e0\uff1a\u4e00\u4e2a\u4ece\u6765\u4e0d\u63a5\u6536 id \u7684\u51fd\u6570<\/h3>\n<p><code>assignOwner()<\/code> \u7684\u7b7e\u540d\u662f <code>(vmid, username)<\/code>\u2014\u2014\u5b83\u538b\u6839\u6ca1\u6709 <code>userId<\/code> \u8fd9\u4e2a\u53c2\u6570\u3002<\/p>\n<pre class=\"wp-block-code\"><code>\nfunction assignOwner(vmid, username) {\n  if (!vmid || !username) return false\n  const own = loadOwnership()\n  own[String(vmid)] = {\n    userId: (own[key] &amp;&amp; own[key].userId) || '',  \/\/ \u539f\u503c\u6ca1\u6709 \u2192 \u7a7a\n    username,\n    assignedAt: new Date().toISOString(),\n    by: 'shop',\n  }\n  saveOwnership(own)\n}\n<\/code><\/pre>\n<p>\u7a7a\u503c\u4e5f\u88ab&#8221;\u5408\u7406\u5730&#8221;\u4fdd\u7559\u4e86\u2014\u2014\u4e0a\u4e00\u884c\u6ce8\u91ca\u7684\u610f\u601d\u662f&#8221;\u522b\u8986\u76d6\u5df2\u6709 id&#8221;\uff0c\u903b\u8f91\u6ca1\u9519\uff0c\u4f46\u5b83\u9ed8\u8ba4\u4e86<strong>\u8c03\u7528\u65b9\u5df2\u7ecf\u5199\u8fc7\u4e00\u6b21 id<\/strong>\u3002\u800c shop \u4e0b\u5355\u8fd9\u6761\u8def\u5f84\u662f\u65b0\u52a0\u7684\uff0c\u4ece\u6765\u6ca1\u5199\u8fc7\u3002<\/p>\n<h3>\u4e3a\u4ec0\u4e48\u534a\u5e74\u6ca1\u88ab\u53d1\u73b0<\/h3>\n<p>\u770b\u5339\u914d\u903b\u8f91\uff1a<\/p>\n<pre class=\"wp-block-code\"><code>\nreturn o.userId === user.id || o.username === user.username\n<\/code><\/pre>\n<p><strong><code>||<\/code> \u6551\u4e86\u8fd9\u4e2a bug\uff0c\u4e5f\u85cf\u4e86\u8fd9\u4e2a bug\u3002<\/strong><\/p>\n<p><code>username<\/code> \u515c\u5e95\u751f\u6548\uff0c\u6240\u4ee5\u53ea\u8981\u7528\u6237\u540d\u4e0d\u91cd\u590d\uff0c\u7528\u6237\u7167\u6837\u80fd\u770b\u5230\u81ea\u5df1\u7684\u673a\u5668\u3002\u95ee\u9898\u53ea\u5728\u4e24\u79cd\u60c5\u51b5\u4e0b\u66b4\u9732\uff1a<\/p>\n<ul>\n<li>\u7528\u6237\u6539\u540d\uff08\u6539\u540d\u540e username \u5bf9\u4e0d\u4e0a\uff0cuserId \u53c8\u662f\u7a7a \u2192 \u5f7b\u5e95\u5931\u8054\uff09<\/li>\n<li>\u7528\u6237\u540d\u4e0e\u5b9e\u9645\u8d26\u53f7\u4e0d\u4e00\u81f4\uff08\u8fd9\u6b21\u5c31\u662f\uff1a\u4e0b\u5355\u586b <code>lllxz9<\/code>\uff0c\u767b\u5f55\u7684\u662f <code>llly9<\/code>\uff09<\/li>\n<\/ul>\n<p>\u4e00\u4e2a\u515c\u5e95\u5206\u652f\u8ba9\u7cfb\u7edf&#8221;\u770b\u8d77\u6765\u80fd\u7528&#8221;\uff0c\u4ee3\u4ef7\u662f\u628a\u6570\u636e\u7f3a\u9677\u6574\u6574\u57cb\u4e86\u534a\u5e74\u3002<strong>\u80fd\u8dd1\u4e0d\u7b49\u4e8e\u5bf9<\/strong>\u2014\u2014\u8fd9\u662f\u6211\u8fd9\u6b21\u6700\u60f3\u8bb0\u4e0b\u6765\u7684\u4e00\u6761\u3002<\/p>\n<h3>\u4fee\u590d<\/h3>\n<p>\u4e09\u5904\u6539\u52a8\uff0c\u90fd\u4e0d\u590d\u6742\uff1a<\/p>\n<pre class=\"wp-block-code\"><code>\n\/\/ 1. \u51fd\u6570\u63a5\u6536 userId\nfunction assignOwner(vmid, username, userId) {\n  ...\n  userId: userId || (own[key] &amp;&amp; own[key].userId) || '',\n}\n\n\/\/ 2. \u900f\u4f20\u7ed9 shop \u6a21\u5757\nassignOwner: (vmid, username, userId) =&gt; assignOwner(vmid, username, userId),\n\n\/\/ 3. shop.mjs \u4e94\u5904\u8c03\u7528\u8865\u7b2c\u4e09\u53c2\nD.assignOwner(vmid, order.user, order.userId)\n<\/code><\/pre>\n<p>\u5b58\u91cf\u6570\u636e\u5355\u72ec\u8865\uff1aCT 212 \u7684 <code>userId<\/code> \u5199\u56de <code>64e5c42e102d7677mvchpyju<\/code>\uff0c\u4e0d\u7528\u7b49\u7528\u6237\u518d\u4e0b\u5355\u4e00\u6b21\u3002<\/p>\n<p>\u7248\u672c\u53f7 7.20.5\uff0c\u6253\u5305\u3001\u63a8\u9001\u3001\u91cd\u542f\uff0c\u5065\u5eb7\u68c0\u67e5 <code>{\"ok\":true,\"db\":\"up\",\"version\":\"7.20.5\"}<\/code>\uff0c13 \u79d2\u8d77\u670d\u3002<\/p>\n<h3>\u4e09\u6761\u53ef\u4ee5\u590d\u7528\u7684\u7ecf\u9a8c<\/h3>\n<p><strong>\u7b2c\u4e00\uff0c\u5f52\u5c5e\u8868\u5fc5\u987b\u6709\u4e24\u4e2a\u952e\u3002<\/strong> \u53ea\u5b58 username \u7b49\u4e8e\u628a\u8eab\u4efd\u7ed1\u5728\u4e86\u4e00\u4e2a\u53ef\u53d8\u7684\u663e\u793a\u540d\u4e0a\u3002userId \u662f\u4e0d\u53ef\u53d8\u7684\uff0cusername \u662f\u53ef\u6539\u7684\u2014\u2014\u4e24\u4e2a\u90fd\u5b58\uff0c\u5339\u914d\u624d\u6709\u5197\u4f59\u3002<\/p>\n<p><strong>\u7b2c\u4e8c\uff0c\u515c\u5e95\u903b\u8f91\u8981\u505a\u6210&#8221;\u53ef\u7591&#8221;\u800c\u4e0d\u662f&#8221;\u9759\u9ed8&#8221;\u3002<\/strong> <code>a || b<\/code> \u8ba9\u7cfb\u7edf\u5bb9\u9519\uff0c\u4f46\u5982\u679c\u4e0d\u6253\u65e5\u5fd7\uff0c\u4f60\u6c38\u8fdc\u4e0d\u77e5\u9053\u8d70\u4e86\u54ea\u4e2a\u5206\u652f\u3002\u4ee5\u540e\u8fd9\u7c7b\u515c\u5e95\u6211\u4f1a\u52a0\u4e00\u884c <code>if (!o.userId) logger.warn(...)<\/code>\uff0c\u8ba9\u5b83\u5728\u76d1\u63a7\u91cc\u5192\u5934\u3002<\/p>\n<p><strong>\u7b2c\u4e09\uff0c\u6392\u67e5\u987a\u5e8f\u4ece&#8221;\u8bc1\u636e\u94fe\u6700\u4e0b\u6e38&#8221;\u5f00\u59cb\u3002<\/strong> \u524d\u7aef \u2192 API \u2192 \u6570\u636e\u6587\u4ef6 \u2192 PVE\uff0c\u4e00\u5c42\u5c42\u5f80\u4e0b\uff0c\u6bcf\u5c42\u90fd\u7559\u8bc1\u636e\u3002\u8fd9\u6b21\u4ece\u622a\u56fe\u5230\u6839\u56e0\u53ea\u82b1\u4e86\u56db\u6b21\u67e5\u8be2\uff0c\u9760\u7684\u5c31\u662f\u4e0d\u731c\u3001\u53ea\u770b\u3002<\/p>\n<p>\u4ea4\u4ed8\u7cfb\u7edf\u7684\u4fe1\u4efb\u5f88\u8106\u5f31\uff1a\u7528\u6237\u4e0d\u4f1a\u5173\u5fc3\u4f60\u7684 <code>stages<\/code> \u8dd1\u5b8c\u4e86\u516d\u4e2a\uff0c\u4ed6\u53ea\u770b\u5217\u8868\u91cc\u6709\u6ca1\u6709\u90a3\u53f0\u673a\u5668\u3002<strong>\u770b\u4e0d\u89c1\uff0c\u5c31\u7b49\u4e8e\u6ca1\u7ed9\u3002<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u73b0\u8c61\uff1a\u94b1\u4ed8\u4e86\uff0c\u673a\u5668\u5728\u8dd1\uff0c\u5217\u8868\u662f\u7a7a\u7684 \u7528\u6237\u53d1\u6765\u622a\u56fe\uff1a\u6211\u7684\u670d\u52a1\u5668 \u9875\u9762\u5e72\u51c0\u5f97\u50cf\u65b0\u53f7\u2014\u2014&#8221;\u8fd8\u6ca1\u6709\u670d\u52a1\u5668\uff0c\u8d2d\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","category-cat-e68a80e69cafe697"],"_links":{"self":[{"href":"https:\/\/www.woiov.cn\/index.php?rest_route=\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.woiov.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.woiov.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.woiov.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.woiov.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=67"}],"version-history":[{"count":0,"href":"https:\/\/www.woiov.cn\/index.php?rest_route=\/wp\/v2\/posts\/67\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.woiov.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.woiov.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.woiov.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}