[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-4.17] tools/ocaml/xenstored: fix live update exception
- To: Christian Lindig <christian.lindig@xxxxxxxxxx>
- From: Edwin Torok <edvin.torok@xxxxxxxxxx>
- Date: Fri, 21 Oct 2022 08:01:28 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gA0NvLnL3Fdi9ealQa+fLB0ppRWib8sd7dPdiRQcZ6A=; b=FwimdSidqSLnoKe7uYRHuyJ+V4kKwVp1XGzaMbkpa1KvNS/g0/aj5pFHj9tssZcrwYVVUv7ue9ikgNSA79OAhPGsPgHhy+vE/m3eiR/9yRQz+GVHkrz+cea1rzuA9gEB7XlLfLBlBPt1RCeijxbn3Mfc7sRZJMiZsZbYaR87ukmhmUKft11YEhlo0nrGmQCPt5mw5WS8YAtheLSCslBdI7oUwfPipQxP/VN7kBIkH57mIPFCSmWXpn2F3RJzeIIUyFvtK/t3h3lpCW5yVbP3JfPM6EWJJig0RK1+GgToJeiidGV5IHwSUtk4F94ys/z1D1CwbWyH+hxm6Df+j1JctA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l8H0snc/oBXPu2kwd9UsA7bGOmIRLrPhfsLDeBdfar8hpc2Wk3g8tZQBxNg3B1WptNcVVtYUJ2M4vte/gXEtObXaKvA54woUajWR+FXvxz+aIGzsAuWfMkI1CLmzvTWv4hBznKPfX+MBZQoKgdU7JIyoex2E969ujut6pw4LWo7+DLn6HSueS+h0I8CPDzUyckeTzDYGmVS0hdTtuqWdf75iqOClXelAggLg3IvdVNtevF2h4oJczR1xvs5zVydqmt/f23yEzO4zsy/oWj4edgsA3lFE4kppi4DVfJI+GcSQA9vOODehXY1wmgeKLmT0xSVl1oCRwaVRK0jW74pEKA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Delivery-date: Fri, 21 Oct 2022 08:02:14 +0000
- Ironport-data: A9a23:4GSqVKx7N2Oc1lVfNad6t+cBxyrEfRIJ4+MujC+fZmUNrF6WrkVUz GFJDz3Ub6zbYGD9Ltl3bti18hwFvsfcyYNkSldvpSAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHPykYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbyRFtspvlDs15K6o4WtC5wRnDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIw5L9rGT5tr ccjdnMzbRKypL21mb7lY7w57igjBJGD0II3nFhFlGucJ9B2BJfJTuPN+MNS2yo2ioZWB/HCa sEFaD1pKhPdfxlIPVRRA5U79AuqriCnL3sE9xTI+OxuvDe7IA9ZidABNPLYdsKLQ4NJmVyfp UrN/njjAwFcP9uaodaA2iL23bSXxH+rMG4UPOCm6P0zjFq1/WNJT0YMDneZqMCCuFHrDrqzL GRRoELCt5Ma5EGtC9XwQRC8iHqFpQIHHcpdFfUg7wOAwbaS5ByWbkAIRyBMQMYrv8g3QXotz FDht8ztLSxitvuSU3313peZqymjfxccK2AqbDUBCwAC5rHeTJobixvOSpNpFv6zh9isQzXom WnV8245mqkZitMN2+Oj51fbjjmwp5/PCAko+gHQWWHj5QR8DGK4W7GVBZHgxa4oBO6kopOp5 SRsdxS2hAzWMaywqQ==
- Ironport-hdrordr: A9a23:IEppLqAKFnwyxF3lHegPsceALOsnbusQ8zAXPh9KJCC9I/bzqy nxpp8mPEfP+U0ssHFJo6HiBEEZKUmsuKKdkrNhR4tKOzOW9FdATbsSp7cKpgeNJ8SQzJ876U 4NSclD4ZjLfCBHZKXBkUaF+rQbsb+6GcmT7I+woUuFDzsaEp2IhD0JaDpzZ3cGIDWucqBJca Z0iPAmmxOQPVAsKuirDHgMWObO4/fRkoj9XBIADxk7rCGTkDKB8tfBYlml9yZbdwkK7aYp8G DDnQC8zL6kqeuHxhjV0HKWx4hKmeHm1sBICKW3+4gow3TX+0WVjbZaKvi/VQMO0aWSAZER4Z 7xSiIbToZOArXqDyeISFXWqlDdOX0VmgLfIBej8AfeSIrCNXwH4oN69PxkWwqc5Ew6sN5m1q VXm2qfqppMFBvF2D/w/t7SSnhR5wOJSepLq59ts5Vza/poVFZql/1owGpFVJMbWC7q4oEuF+ djSMna+fZNaFufK3TUpHNmztCgVmk6Wk7ueDlIhuWFlzxN2HxpxUoRw8IS2n8G6ZImUpFBo+ DJKL5hmr1CRtIfKah9GOACS82qDXGle2OFDEuCZVD8UK0XMXPErJD6pL0z+eGxYZQNiIA/nZ zQOWkowVLau3iefPFm8Kc7gSwlGl/NLAgF4vsul6RRq/n7WKfhNzGFRRQnj9agys9vcPHmZw ==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHY5KTJuDEKM//4x0G7vfjVpiIJ8K4YejoAgAADIQA=
- Thread-topic: [PATCH for-4.17] tools/ocaml/xenstored: fix live update exception
> On 21 Oct 2022, at 08:50, Christian Lindig <christian.lindig@xxxxxxxxxx>
> wrote:
>
>
>
>> On 20 Oct 2022, at 17:54, Edwin Török <edvin.torok@xxxxxxxxxx> wrote:
>>
>> During live update we will load the /tool/xenstored path from the previous
>> binary,
>> and then try to mkdir /tool again which will fail with EEXIST.
>> Check for existence of the path before creating it.
>>
>> The write call to /tool/xenstored should not need any changes
>> (and we do want to overwrite any previous path, in case it changed).
>>
>> Prior to 7110192b1df6 live update would work only if the binary path was
>> specified, and with 7110192b1df6 and this live update also works when
>> no binary path is specified in `xenstore-control live-update`.
>>
>> Fixes: 7110192b1df6 ("tools/oxenstored: Fix Oxenstored Live Update")
>> Signed-off-by: Edwin Török <edvin.torok@xxxxxxxxxx>
>> ---
>> tools/ocaml/xenstored/xenstored.ml | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/ocaml/xenstored/xenstored.ml
>> b/tools/ocaml/xenstored/xenstored.ml
>> index fc90fcdeb5..3299fe73f7 100644
>> --- a/tools/ocaml/xenstored/xenstored.ml
>> +++ b/tools/ocaml/xenstored/xenstored.ml
>> @@ -353,7 +353,9 @@ let _ =
>> ) in
>>
>> (* required for xenstore-control to detect availability of live-update
>> *)
>> - Store.mkdir store Perms.Connection.full_rights (Store.Path.of_string
>> "/tool");
>> + let tool_path = Store.Path.of_string "/tool" in
>> + if not (Store.path_exists store tool_path) then
>> + Store.mkdir store
>> Perms.Connection.full_rights tool_path;
>> Store.write store Perms.Connection.full_rights
>> (Store.Path.of_string "/tool/xenstored") Sys.executable_name;
>
> I notice inconsistent indentation but let's ignore that or fix it before the
> committing.
>
> Acked-by: Christian Lindig <christian.lindig@xxxxxxxxxx>
>
Thanks, fixed indentation here:
https://github.com/edwintorok/xen/commit/4a89f1f44cb171e1f92dae2401a580a10fd0c5a0
And v2 patch should show up on the ML with the 2 acks included and fixed
indentation soon too.
Best regards,
--Edwin
|