cloud-init team mailing list archive
-
cloud-init team
-
Mailing list archive
-
Message #00296
Re: Where (if anywhere) do MIME-bundled x-shellscripts get placed?
Thanks! Yep, there it is.
It turns out when I broadened my search to /var/lib/cloud, I screwed up: I
put a watch on that folder on the _host_ Ubuntu system, not my new lxd
instance. And of course, since my Ubuntu EC2 instance also uses cloud-init,
it's a perfectly valid directory. Just happens to be the wrong one.
Thanks so much Ryan!
Bean
On Thu, Aug 27, 2020 at 1:19 PM Ryan Harper <rharper@xxxxxxxxxxx> wrote:
> Hi,
>
> You should find your shellscript mime payload in:
>
> /var/lib/cloud/instance/scripts/<scriptname>
>
> Example use and check:
> https://paste.ubuntu.com/p/s58mjFBZsZ/
>
> Ryan
>
> On Thu, Aug 27, 2020 at 12:00 PM Bean Taxi <beantaxi@xxxxxxxxx> wrote:
>
>> Hello all!
>>
>> I have a simple multipart MIME with a cloud-config part and a simple
>> x-shellscript part. It is working fine. But _before_ it was working fine, I
>> tried troubleshooting by looking around for the x-shellscript to be dropped
>> in /var/lib/cloud/scripts/per-instance, and then broadened my search to
>> /var/lib/cloud, and never found it. Ultimately I apparently fixed my issue,
>> and my script started executing on instance creation, and it was all good.
>> But I still never saw a script getting copied where I expected it.
>>
>> From reading the code for cloudinit/handlers/shellscript.py, it looks
>> like the script should be copied to the per-instance folder somewhere
>> similar. But it's slow going for me to understand the code and I could
>> easily be missing something. So I figured I'd just ask.
>>
>> Does that file get copied somewhere I'm not looking? Or is it run 'in
>> place' from the MIME file, or perhaps from a persisted user-data file of
>> some sort?
>>
>> Thanks!
>> Bean
>>
>>
>> --
>> Mailing list: https://launchpad.net/~cloud-init
>> Post to : cloud-init@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~cloud-init
>> More help : https://help.launchpad.net/ListHelp
>>
>
References