{"id":25499,"date":"2023-06-01T23:17:29","date_gmt":"2023-06-01T21:17:29","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=25499"},"modified":"2023-06-12T10:06:19","modified_gmt":"2023-06-12T08:06:19","slug":"troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/","title":{"rendered":"Troubleshoot cloud-unit &#8220;Error: Invalid cloud-config schema: user-data&#8221; @\u00a0Oracle Cloud Infrastructure"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"151\" height=\"100\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image.png\" alt=\"\" class=\"wp-image-20970\" \/><\/figure>\n\n\n\n<p>While applying what seemed to be a minor update, we managed to &#8220;break&#8221; our cloud-init automated OCI compute instance deployment process. This blog describes how to quickly troubleshoot &amp; debug your #cloud-config on Oracle Cloud Infrastructure (not so different from other hyperscalers)<\/p>\n\n\n\n<p><strong>safe harbor statement <\/strong><\/p>\n\n\n\n<p>The below troubleshooting scenario has been simplified to ease the understanding of the root cause analysis<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1, Identify the error message<\/h2>\n\n\n\n<p>Let&#8217;s start our investigation at the roots, with logfiles. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Python modules log: \/var\/log\/cloud-init.log<\/h3>\n\n\n\n<p>By default, all python module vent are logged with the standard hierarchy levels : WARNING, DEBUG, aso ..<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>&#091;opc@bastion-vpn-server ~]$ sudo tail -f -n2 \/var\/log\/cloud-init.log\n2023-05-31 20:15:44,198 - util.py&#091;DEBUG]: cloud-init mode 'modules' took 8.091 seconds\n2023-05-31 20:15:44,198 - handlers.py&#091;DEBUG]: finish: modules-final: FAIL: running modules for final<\/code><\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Hum, interesting! last line shows we ran until final stage (aka. our user-defined #cloud-config). But it&#8217;s still unclear what really caused the failure.<\/p>\n\n\n\n<p>Let&#8217;s move forward to the next log.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">cloud-init configuration output: \/var\/log\/cloud-init-output.log<\/h3>\n\n\n\n<p>Now, we just moved to the &#8220;main&#8221; logfile which protocols all #cloud-config configuration output (aka. STDOUT and STDERR)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>[opc@bastion-vpn-server ~]$ <strong>sudo tail -f  \/var\/log\/cloud-init-output.log<\/strong>\n...\n... &lt;snippet truncated&gt;\n...\n<mark class=\"has-inline-color has-cyan-bluish-gray-color\">\/var\/lib\/cloud\/instance\/scripts\/runcmd: line 2: \/usr\/bin: Is a directory\n<\/mark><\/code>...\n... &lt;snippet truncated&gt;\n...<code><mark class=\"has-inline-color has-cyan-bluish-gray-color\">\nNo match for argument: htop\nError: Unable to find a match: htop<\/mark><\/code>\n...\n... &lt;snippet truncated&gt;\n...<code>\n<mark class=\"has-inline-color has-cyan-bluish-gray-color\">2023-05-31 20:15:44,107 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in \/var\/lib\/cloud\/instance\/scripts)\n2023-05-31 20:15:44,107 - util.py[WARNING]: Running module scripts-user () failed<\/mark><\/code><\/pre>\n\n\n\n<p id=\"block-d4099ab5-15e7-4ac5-b0c3-69b122bfdf49\"><br>Hum, we get closer! Looks like a command was not interpreted correctly but do we have still access to the commands executed? Yes, of course check the generated scripts in \/var\/lib\/cloud\/instance\/scripts:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>[opc@bastion-vpn-server ~]$ <strong>sudo cat \/var\/lib\/cloud\/instance\/scripts\/runcmd<\/strong>\n#!\/bin\/sh\n'\/usr\/bin' 'dnf' '-y' 'install' 'https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-8.noarch.rpm'\n'\/usr\/bin\/sleep' '5'\n'\/usr\/bin\/dnf' '-y' 'install' 'htop'<\/code><\/pre>\n\n\n\n<p>From now on, a Linux expert will immediate recognize a typo ! Are we sure we have only a single error? Let&#8217;s move forward and try to validate the syntax<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2, Validate cloud-init user-data deployed on the system<\/h2>\n\n\n\n<p>Now, here we (almost) cheated ! Unfortunately, on OCI cloud-init version isn&#8217;t up2date (Release 22.1 GA date Feb. 2022).  And no, Oracle is not lagging behind others large hyperscalers (at least compared to the one with the smile). Indeed, cloud-init evolves very quickly and the documentation is not very easy to follow especially across releases. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Validate the syntax as follows (At the time of writing this post the cloud-init release 22.1 is available on OCI):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>[opc@bastion-vpn-server ~]# <strong>sudo cloud-init --version<\/strong>\n\/usr\/bin\/cloud-init 22.1-6.0.4.el8_7.2\n[opc@bastion-vpn-server ~]$ <strong>sudo cloud-init devel schema --system<\/strong>\nError:\nCloud config schema errors: runcmd.1: ['\/usr\/bin\/sleep', 5] is not valid under any of the given schemas<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Since cloud-init release 22.2 (GA date May 2022) the command to validate cloud-init user-data evolved to:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>[opc@bastion-vpn-server opt]$ <strong>sudo cloud-init --version<\/strong>\n$\/bin\/cloud-init 23.2\n[opc@bastion-vpn-server opt]$ <strong>sudo cloud-init schema --system<\/strong>\nInvalid cloud-config \/var\/lib\/cloud\/instances\/ocid1.instance.oc1.eu-zurich-1.an5heljr4p5qcaac5uh7vhwsfmycazwru55ywyfrpljox76mn6edhyvfyfza\/cloud-config.txt\nError: Cloud config schema errors: runcmd.1: ['\/usr\/bin\/sleep', 5] is not valid under any of the given schemas\nError: Invalid cloud-config schema: user-data<\/code><\/pre>\n\n\n\n<p>The last snippet is an example after latest cloud-init release was installed from source code (<a href=\"https:\/\/github.com\/canonical\/cloud-init\/releases\">https:\/\/github.com\/canonical\/cloud-init\/releases<\/a>)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><br>But wait a minute? this is not really the problem identified earlier, isn&#8217;t it?<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/var\/lib\/cloud\/instance\/scripts\/runcmd: line 2: \/usr\/bin: Is a directory\n<\/pre>\n\n\n\n<p>Indeed, we have introduced not only one typo but also a second issue (syntax inconsistency).<\/p>\n\n\n\n<p>Let&#8217;s move forward and retrieve the &#8220;raw\/original&#8221; #cloud-config<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step3, retrieve (and validate) raw user-data #cloud-config<\/h2>\n\n\n\n<p>The cloud-init user-datas is passed to the compute instance through RestAPIs. On OCI you can retrieve the #cloud-config user data YAML file as follows:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>[opc@bastion-vpn-server ~]$ <strong>curl --silent -H \"Authorization: Bearer Oracle\" -L http:\/\/169.254.169.254\/opc\/v2\/instance\/metadata\/user_data -o - | base64 --decode &gt; \/tmp\/cloud-init_user-data.yml<\/strong><\/code><\/pre>\n\n\n\n<p>Now, we can use the aforementioned syntax validation commands to get rid of the error(s):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>[opc@bastion-vpn-server opt]$ <strong>sudo cloud-init devel schema --config-file<\/strong> <strong>\/tmp\/cloud-init_user-data.yml<\/strong>\nInvalid cloud-config \/tmp\/cloud-init_user-data.yml\n<mark class=\"has-inline-color has-cyan-bluish-gray-color\">Error: Cloud config schema errors: runcmd.1: ['\/usr\/bin\/sleep', 5] is not valid under any of the given schemas<\/mark>\nError: Invalid cloud-config schema: user-data\n[opc@bastion-vpn-server opt]$ <strong>vi \/tmp\/cloud-init_user-data.yml<\/strong>\n...\n&lt;fix the typo&gt;\n...\n[opc@bastion-vpn-server opt]$ <strong>sudo cloud-init devel schema --config-file <\/strong>\/tmp\/cloud-init_user-data.yml\n<mark class=\"has-inline-color has-cyan-bluish-gray-color\">Valid cloud-config: \/tmp\/cloud-init_user-data.yml<\/mark><\/code><\/pre>\n\n\n\n<p>Sounds good? Might be too easy to be true but who knows \ud83d\ude09<br>Now, we identified, fixed error and tested the fixes by re-running the whole provisioning process.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4, if needed re-run #cloud-config stages\/modules<\/h2>\n\n\n\n<p>Working with cloud-init can sometimes be really annoying as it&#8217;s a very complex tool with orchestrated stages, modules (ie: runcmd, ansible, write_files, aso&#8230;) which are customizable and customized by each hyperscaler differently. <\/p>\n\n\n\n<p>Follows, the cheat sheet to get through if further troubleshooting is needed<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Remove logs and artifacts so cloud-init can re-run\nsudo cloud-init clean --logs\n\n# Detect local #cloud-config source (ie: cloud platform settings, IPs, routes)\nsudo cloud-init init\nsudo cloud-init init --local\n\n# Run #cloud-config modules defined in \/etc\/cloud\/cloud.cfg (ie: timezone)\nsudo cloud-init modules --mode=config \n\n# Re-run user accustomed #cloud-config\nsudo cloud-init modules --mode=final\n\n# Alternatively, re-run only a single user accustomed #cloud-config module\nsudo cloud-init single --name runcmd<\/code><\/pre>\n\n\n\n<p>Well, depending on \/etc\/cloud\/cloud.cfg settings most of the modules if executed won&#8217;t be re-executed without tweaking the config.file if they already ran (whatever the outcome). <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>[opc@bastion-vpn-server ~]$ sudo tail -f  \/var\/log\/cloud-init.log\n...\n... &lt;snippet truncated&gt;\n...\n2023-06-01 21:15:44,968 - helpers.py[DEBUG]: config-runcmd already ran (freq=once-per-instance)<\/code>\n<\/pre>\n\n\n\n<p>Please refer to the documentation to<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Understand how to modify execution frequency <br><a href=\"https:\/\/cloudinit.readthedocs.io\/en\/latest\/howto\/module_run_frequency.html\">https:\/\/cloudinit.readthedocs.io\/en\/latest\/howto\/module_run_frequency.html<\/a><\/li>\n\n\n\n<li>Understand the order of stages<br><a href=\"https:\/\/cloudinit.readthedocs.io\/en\/latest\/explanation\/boot.html\">https:\/\/cloudinit.readthedocs.io\/en\/latest\/explanation\/boot.html<\/a><\/li>\n\n\n\n<li>Identify default module execution frequency<br><a href=\"https:\/\/cloudinit.readthedocs.io\/en\/latest\/reference\/modules.html\">https:\/\/cloudinit.readthedocs.io\/en\/latest\/reference\/modules.html<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Have fun on #OCI with #cloud-init<\/h2>\n\n\n\n<p>Hope this post was worth reading \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While applying what seemed to be a minor update, we managed to &#8220;break&#8221; our cloud-init automated OCI compute instance deployment process. This blog describes how to quickly troubleshoot &amp; debug your #cloud-config on Oracle Cloud Infrastructure (not so different from other hyperscalers) safe harbor statement The below troubleshooting scenario has been simplified to ease the [&hellip;]<\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[955,2966],"tags":[2969,2970,2967,2968],"type_dbi":[],"class_list":["post-25499","post","type-post","status-publish","format-standard","hentry","category-cloud","category-oci","tag-cloud-3","tag-cloud-init-2","tag-oci-2","tag-oracle-3"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Troubleshoot cloud-unit &quot;Error: Invalid cloud-config schema: user-data&quot; @\u00a0Oracle Cloud Infrastructure - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Troubleshoot cloud-unit &quot;Error: Invalid cloud-config schema: user-data&quot; @\u00a0Oracle Cloud Infrastructure\" \/>\n<meta property=\"og:description\" content=\"While applying what seemed to be a minor update, we managed to &#8220;break&#8221; our cloud-init automated OCI compute instance deployment process. This blog describes how to quickly troubleshoot &amp; debug your #cloud-config on Oracle Cloud Infrastructure (not so different from other hyperscalers) safe harbor statement The below troubleshooting scenario has been simplified to ease the [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-01T21:17:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-12T08:06:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image.png\" \/>\n<meta name=\"author\" content=\"J\u00e9r\u00f4me Witt\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"J\u00e9r\u00f4me Witt\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/\"},\"author\":{\"name\":\"J\u00e9r\u00f4me Witt\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/a2d3ecddaf732850101a39b9d62c31b7\"},\"headline\":\"Troubleshoot cloud-unit &#8220;Error: Invalid cloud-config schema: user-data&#8221; @\u00a0Oracle Cloud Infrastructure\",\"datePublished\":\"2023-06-01T21:17:29+00:00\",\"dateModified\":\"2023-06-12T08:06:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/\"},\"wordCount\":607,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image.png\",\"keywords\":[\"#Cloud\",\"#cloud-init\",\"#OCI\",\"#Oracle\"],\"articleSection\":[\"Cloud\",\"OCI\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/\",\"name\":\"Troubleshoot cloud-unit \\\"Error: Invalid cloud-config schema: user-data\\\" @\u00a0Oracle Cloud Infrastructure - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image.png\",\"datePublished\":\"2023-06-01T21:17:29+00:00\",\"dateModified\":\"2023-06-12T08:06:19+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/a2d3ecddaf732850101a39b9d62c31b7\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image.png\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image.png\",\"width\":151,\"height\":100},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Troubleshoot cloud-unit &#8220;Error: Invalid cloud-config schema: user-data&#8221; @\u00a0Oracle Cloud Infrastructure\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/a2d3ecddaf732850101a39b9d62c31b7\",\"name\":\"J\u00e9r\u00f4me Witt\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/17095c081578ca53f52ec4030ba2bde72cc18badb325cd2ba1ee2831106507ad?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/17095c081578ca53f52ec4030ba2bde72cc18badb325cd2ba1ee2831106507ad?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/17095c081578ca53f52ec4030ba2bde72cc18badb325cd2ba1ee2831106507ad?s=96&d=mm&r=g\",\"caption\":\"J\u00e9r\u00f4me Witt\"},\"description\":\"J\u00e9rome Witt started his Consultant career a few years ago. He is specialized in database and infrastructure management, engineering, and optimization. He is very skilled in Oracle high availability, backup &amp; recovery, and tuning technologies. His expertise also includes the open source field (Linux\/Unix), advanced Perl, Shell, Windows PowerShell programming, and Automation tools (UC4). J\u00e9r\u00f4me Witt is Oracle Certified Professional 11g (OCP 11g), Oracle Certified Expert Tuning (OCE), and ITIL V3 Foundation certified. Prior to joining dbi services, J\u00e9r\u00f4me Witt was Consultant at Trivadis in Basel. He also worked as a Junior Automation specialist at Selmoni AG in Basel. J\u00e9r\u00f4me Witt holds a BTS degree in Information Systems and Industrial Networks from France. His branch-related experience covers Pharma, Health Care, Banking &amp; Financial Services, Energy, Automotive etc.\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/jerome-witt\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Troubleshoot cloud-unit \"Error: Invalid cloud-config schema: user-data\" @\u00a0Oracle Cloud Infrastructure - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/","og_locale":"en_US","og_type":"article","og_title":"Troubleshoot cloud-unit \"Error: Invalid cloud-config schema: user-data\" @\u00a0Oracle Cloud Infrastructure","og_description":"While applying what seemed to be a minor update, we managed to &#8220;break&#8221; our cloud-init automated OCI compute instance deployment process. This blog describes how to quickly troubleshoot &amp; debug your #cloud-config on Oracle Cloud Infrastructure (not so different from other hyperscalers) safe harbor statement The below troubleshooting scenario has been simplified to ease the [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/","og_site_name":"dbi Blog","article_published_time":"2023-06-01T21:17:29+00:00","article_modified_time":"2023-06-12T08:06:19+00:00","og_image":[{"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image.png","type":"","width":"","height":""}],"author":"J\u00e9r\u00f4me Witt","twitter_card":"summary_large_image","twitter_misc":{"Written by":"J\u00e9r\u00f4me Witt","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/"},"author":{"name":"J\u00e9r\u00f4me Witt","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/a2d3ecddaf732850101a39b9d62c31b7"},"headline":"Troubleshoot cloud-unit &#8220;Error: Invalid cloud-config schema: user-data&#8221; @\u00a0Oracle Cloud Infrastructure","datePublished":"2023-06-01T21:17:29+00:00","dateModified":"2023-06-12T08:06:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/"},"wordCount":607,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image.png","keywords":["#Cloud","#cloud-init","#OCI","#Oracle"],"articleSection":["Cloud","OCI"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/","url":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/","name":"Troubleshoot cloud-unit \"Error: Invalid cloud-config schema: user-data\" @\u00a0Oracle Cloud Infrastructure - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image.png","datePublished":"2023-06-01T21:17:29+00:00","dateModified":"2023-06-12T08:06:19+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/a2d3ecddaf732850101a39b9d62c31b7"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image.png","width":151,"height":100},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/troubleshoot-cloud-unit-error-invalid-cloud-config-schema-user-data-oracle-cloud-infrastructure\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Troubleshoot cloud-unit &#8220;Error: Invalid cloud-config schema: user-data&#8221; @\u00a0Oracle Cloud Infrastructure"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/a2d3ecddaf732850101a39b9d62c31b7","name":"J\u00e9r\u00f4me Witt","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/17095c081578ca53f52ec4030ba2bde72cc18badb325cd2ba1ee2831106507ad?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/17095c081578ca53f52ec4030ba2bde72cc18badb325cd2ba1ee2831106507ad?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/17095c081578ca53f52ec4030ba2bde72cc18badb325cd2ba1ee2831106507ad?s=96&d=mm&r=g","caption":"J\u00e9r\u00f4me Witt"},"description":"J\u00e9rome Witt started his Consultant career a few years ago. He is specialized in database and infrastructure management, engineering, and optimization. He is very skilled in Oracle high availability, backup &amp; recovery, and tuning technologies. His expertise also includes the open source field (Linux\/Unix), advanced Perl, Shell, Windows PowerShell programming, and Automation tools (UC4). J\u00e9r\u00f4me Witt is Oracle Certified Professional 11g (OCP 11g), Oracle Certified Expert Tuning (OCE), and ITIL V3 Foundation certified. Prior to joining dbi services, J\u00e9r\u00f4me Witt was Consultant at Trivadis in Basel. He also worked as a Junior Automation specialist at Selmoni AG in Basel. J\u00e9r\u00f4me Witt holds a BTS degree in Information Systems and Industrial Networks from France. His branch-related experience covers Pharma, Health Care, Banking &amp; Financial Services, Energy, Automotive etc.","url":"https:\/\/www.dbi-services.com\/blog\/author\/jerome-witt\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/25499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=25499"}],"version-history":[{"count":26,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/25499\/revisions"}],"predecessor-version":[{"id":25530,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/25499\/revisions\/25530"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=25499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=25499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=25499"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=25499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}