openSUSE / fuel-ignition

Easily generate new or edit existing Ignition configs. No more fiddling around with JSON or Butane.
GNU General Public License v2.0
23 stars 7 forks source link

Downloaded config.ign file incorrectly formatted #6

Closed malcolmlewis closed 2 years ago

malcolmlewis commented 2 years ago

Hi The created config.ign code in the presented code window is correctly formated, if I copy and paste formatting is kept as follows;

{
  "ignition": {
    "version": "3.2.0"
  },
  "passwd": {
    "users": [
      {
        "name": "root",
        "passwordHash":

If I download the config.ign file and open in an editor (eg gedit) I see;

{"ignition":{"version":"3.2.0"},"passwd":{"users":[{"name":"root","passwordHash":

I'm using vagrant/libvirt to spin up a Tumbleweed MicroOS image, so after creating a disk image via;

mkdir -p disk/ignition
cp config.ign disk/ignition/
mkisofs -o $(pwd)/ignition.iso -V ignition disk

ISSUE: The cut/paste and saved version allows an image to spin up as expected, the downloaded version puts the system in maintenance mode.

I'm assuming the downloaded image creation lacks the CR/LF to format properly?

faeller commented 2 years ago

Hi Malcolm! Thank you for reporting the issue, I just fixed and tested it in https://github.com/openSUSE/fuel-ignition/commit/c9fea74fd853e77e2df65501d2410b2faea87367

Fortunately, it was not a problem with CR/LF, but I just didn't pretty print it before saving to file. There still seems to be an issue with the hashed password but, at least there's no emergency mode. All the best to ya :)