Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-2487

Not able to modify/rm/cat/cp module-image Artifacts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Higher
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Labels:
      None

      Description

      Affects mender-artifact v3.0.0b1

      How to reproduce:

      ./mender-artifact write module-image -T dummy -n myname -t mydevice -f Makefile 
      ./mender-artifact modify -n new artifact.mender
      Error selecting images for modification: can not process artifact: rename /tmp/mender-artifact113565709 /tmp: file exists
      

      Following a bit in the code, the problem is that the functions unpackArtifact and repack in artifacts.go assume that the type is always rootfs-image

      Other commands are showing similar problems for module-image Artifacts: cp and cat give a similar error as above, but rm command runs into a segfault:

      ./mender-artifact rm artifact.mender
      panic: runtime error: invalid memory address or nil pointer dereference
      [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x629a1b]
      
      goroutine 1 [running]:
      main.Remove.func1(0x0, 0x0)
      	/home/lluis/northern.work/mender-artifact/cli/mender-artifact/copy.go:172 +0x2b
      main.Remove(0xc4200d22c0, 0x6e6680, 0xc42000c8a0)
      	/home/lluis/northern.work/mender-artifact/cli/mender-artifact/copy.go:190 +0x4af
      github.com/mendersoftware/mender-artifact/vendor/github.com/urfave/cli.HandleAction(0x65fe60, 0x6c2aa0, 0xc4200d22c0, 0x0, 0xc4200ceb40)
      	/home/lluis/go/src/github.com/mendersoftware/mender-artifact/vendor/github.com/urfave/cli/app.go:501 +0xc8
      github.com/mendersoftware/mender-artifact/vendor/github.com/urfave/cli.Command.Run(0x6b0aff, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6bbd47, 0x26, 0x0, ...)
      	/home/lluis/go/src/github.com/mendersoftware/mender-artifact/vendor/github.com/urfave/cli/command.go:165 +0x47d
      github.com/mendersoftware/mender-artifact/vendor/github.com/urfave/cli.(*App).Run(0xc4200ec000, 0xc420010180, 0x3, 0x3, 0x0, 0x0)
      	/home/lluis/go/src/github.com/mendersoftware/mender-artifact/vendor/github.com/urfave/cli/app.go:259 +0x6e8
      main.run(0xc4200aa1e0, 0xc4200200b8)
      	/home/lluis/northern.work/mender-artifact/cli/mender-artifact/main.go:399 +0x4b
      main.main()
      	/home/lluis/northern.work/mender-artifact/cli/mender-artifact/main.go:44 +0x22
      

        Attachments

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  lluis Lluís Campos
                  Reporter:
                  lluis Lluís Campos
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support

                      Summary Panel