cloud-init team mailing list archive
-
cloud-init team
-
Mailing list archive
-
Message #00222
Re: Merge userdata and vendordata?
-
To:
"Jorgensen, Andrew" <ajorgens@xxxxxxxxxx>, "cloud-init@xxxxxxxxxxxxxxxxxxx" <cloud-init@xxxxxxxxxxxxxxxxxxx>
-
From:
Thomas Stringer <Thomas.Stringer@xxxxxxxxxxxxx>
-
Date:
Wed, 21 Aug 2019 11:10:17 +0000
-
Accept-language:
en-US
-
Arc-authentication-results:
i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.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-SenderADCheck; bh=ihIHNpqCMIWrfHd0Feo4nLU4SVfUVgnctIM3DAlvRuo=; b=O69bBOs9ZaspmvAUlcnojkHIlIzglXyB7ivzTjSQNzwMaSWSkmop14SB8IZuzrHzrDsgKAYtdsoI53fZY+GmsBo62hdc8uWtTXldPBHasyytOO4pIeTEu+FbdXKwmHc6pVUq8QU5Vi3w4O9fX2x2xzTBwGL828EQ8xHFTlTbRd4wzN6HlG0IdS2POc6Fa2bjBZvDjgHRaYVaZ20Nk3HPIw9FVD4XVsXDNAiQ1YofJEp5VyTEJGU+ziC06gFaZ/KeHSAc8ONuaxK6moCuc+D6JTXu1kT0iVl3Z5wlrdy5AhnHwu+OLLb3hmIZRlvVTRbMEa28XuW0YmL04DE3Xnwz+Q==
-
Arc-seal:
i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FSMVKvqxPOUBmbO4broptc5F01L1dCjqfLj6am2x9LreKIK+bSVM8Df7MJHe8z2qKjQwd2E3EzJn43MMVx4ii+jY17gPtBntkBHMrvGEEikLM1PppJmR/yO/B+8YwZQikdWJZy4VVVwXjOrhsYCZuElssH4v20urZptr0p/bi622LirPZsmRfI/m5cb8TZqeXl1hj8b9B/COsddmY9JQvpcXIEvDt6KnayGs6v/JNqrF1k/zZ1jWs+cFLrutbcIbHguiVjpBlAd8T2vUWeMxTG0nXA+NAgKy5d3frIyz53jzxBjKCcSjjihEBJXYMyTtpw4y9Jr6x6uNtEz2NY+YzA==
-
Authentication-results:
spf=none (sender IP is ) smtp.mailfrom=Thomas.Stringer@xxxxxxxxxxxxx;
-
In-reply-to:
<1566345198065.42960@amazon.com>
-
Msip_labels:
MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=06e44254-5308-4187-8f56-000008f22da7; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2019-08-21T11:09:31Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;
-
Thread-index:
AQHVV5Ck16PFr/Ymwk+1LAwvfxc246cEstfwgAB9AIA=
-
Thread-topic:
Merge userdata and vendordata?
That makes total sense, thanks for the insight! So essentially there currently is no way then to merge userdata with vendordata. Does that sound correct?
On 8/20/19, 7:54 PM, "Jorgensen, Andrew" <ajorgens@xxxxxxxxxx> wrote:
Unfortunately merging only happens within a configuration source, so for example you can merge multiple configs from /etc/cloud/cloud.cfg.d and you can merge mime multipart parts from userdata, but a merge strategy doesn't define what happens when the file configs are merged with the userdata.
See https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.launchpad.net%2Fcloud-init%2F%2Bbug%2F1532234&data=02%7C01%7CThomas.Stringer%40microsoft.com%7C6d1a32a7747140a3da1c08d725c9b38f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637019420549308536&sdata=AKrUYR7nJd5GDchK741Bwi8v2RX9ZNlHRqjPNoSmYwk%3D&reserved=0 for some background and thinking on this.
Kind Regards,
Andrew Jorgensen
________________________________________
From: Cloud-init <cloud-init-bounces+ajorgens=amazon.com@xxxxxxxxxxxxxxxxxxx> on behalf of Thomas Stringer <Thomas.Stringer@xxxxxxxxxxxxx>
Sent: Tuesday, August 20, 2019 12:51 PM
To: cloud-init@xxxxxxxxxxxxxxxxxxx
Subject: [Cloud-init] Merge userdata and vendordata?
I'm currently trying to figure out how to prevent userdata from overwriting vendordata. I was under the impression that specifying merge_how for _both_ userdata and vendordata might be the solution, but in my testing I am not seeing this.
Userdata - /var/lib/cloud/instance/user-data.txt
===========================
#cloud-config
merge_how:
- name: list
settings: [append]
- name: dict
settings: [no_replace, recurse_list]
runcmd:
- echo hello world from user > /run/hello_world_user
Vendordata - /var/lib/cloud/instance/vendor-data.txt
===========================
#cloud-config
merge_how:
- name: list
settings: [append]
- name: dict
settings: [no_replace, recurse_list]
runcmd:
- echo hello world from vendor > /run/hello_world_vendor
I would expect the existence of _both_ files, /run/hello_world_user and /run/hello_world_vendor. But only /run/hello_world_user exists. Am I doing something wrong? If merge_how isn't the way to merge vendordata and userdata, is there another way?
Thank you in advance!
Thomas
--
Mailing list: https://nam06.safelinks.protection.outlook.com/?url=https:%2F%2Flaunchpad.net%2F~cloud-init&data=02%7C01%7CThomas.Stringer%40microsoft.com%7C6d1a32a7747140a3da1c08d725c9b38f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637019420549308536&sdata=Qi565PAomMXr6Tkr5cJOuCfbt5puzxHUefD1x1YJaXU%3D&reserved=0
Post to : cloud-init@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://nam06.safelinks.protection.outlook.com/?url=https:%2F%2Flaunchpad.net%2F~cloud-init&data=02%7C01%7CThomas.Stringer%40microsoft.com%7C6d1a32a7747140a3da1c08d725c9b38f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637019420549308536&sdata=Qi565PAomMXr6Tkr5cJOuCfbt5puzxHUefD1x1YJaXU%3D&reserved=0
More help : https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhelp.launchpad.net%2FListHelp&data=02%7C01%7CThomas.Stringer%40microsoft.com%7C6d1a32a7747140a3da1c08d725c9b38f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637019420549308536&sdata=9PWuxb1tbEMnIQKAXPj1n4hWFkYnqL6VCyif%2FlDavBw%3D&reserved=0
Follow ups
References