Details
-
Type:
Bug
-
Status: Done
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Kanban_Cleanup_2020_06_20
-
Story Points:5
-
Backlog:yes
Description
Running "mender-artifact modify --server-uri <uri> --tenant-token <token" on a ".sdimg" file does not result in a mender.conf file containing my desired values.
The same procedure works as expected on ".mender" artifact files.
I have also tested with older "mender-artifact" version, and this seems like a regression as the commands worked just fine in 2.2.0 release, but not in any of the later ones.
Example to reproduce:
$ export VERSION="1.7.0" mirzak@mk2000 ~/Downloads $ wget https://s3.amazonaws.com/mender/$VERSION/raspberrypi3/mender-raspberrypi3_$VERSION.sdimg.gz--2018-12-21 15:07:28-- https://s3.amazonaws.com/mender/1.7.0/raspberrypi3/mender-raspberrypi3_1.7.0.sdimg.gzLoaded CA certificate '/etc/ssl/certs/ca-certificates.crt'Resolving s3.amazonaws.com (s3.amazonaws.com)... 52.216.102.109 Connecting to s3.amazonaws.com (s3.amazonaws.com)|52.216.102.109|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 130140997 (124M) [application/gzip] Saving to: ‘mender-raspberrypi3_1.7.0.sdimg.gz’ mender-raspberrypi3_1.7.0.sdimg.gz 100%[======================================================================================================================>] 124,11M 8,44MB/s in 15s 2018-12-21 15:07:44 (8,14 MB/s) - ‘mender-raspberrypi3_1.7.0.sdimg.gz’ saved [130140997/130140997] mirzak@mk2000 ~/Downloads $ gunzip mender-raspberrypi3_1.7.0.sdimg.gz mirzak@mk2000 ~/Downloads $ mender-artifact modify --server-uri https://hosted.mender.io --tenant-token "token" mender-raspberrypi3_1.7.0.sdimg mirzak@mk2000 ~/Downloads $ sudo mount -o loop,offset=$((106496*512)) mender-raspberrypi3_1.7.0.sdimg /mnt/ mirzak@mk2000 ~/Downloads $ cat /mnt/etc/mender/mender.conf { "InventoryPollIntervalSeconds": 5, "RetryPollIntervalSeconds": 30, "RootfsPartA": "/dev/mmcblk0p2", "RootfsPartB": "/dev/mmcblk0p3", "ServerCertificate": "/etc/mender/server.crt", "ServerURL": "https://docker.mender.io", "TenantToken": "dummy", "UpdatePollIntervalSeconds": 5 }mirzak@mk2000 ~/Downloads $ mender-artifact NAME: mender-artifact - interface for manipulating Mender artifacts USAGE: mender-artifact [--version][--help] <command> [<args>] VERSION: 2.4.0 AUTHOR: mender.io <contact@mender.io> COMMANDS: write Writes artifact file. read Reads artifact file. validate Validates artifact file. sign Signs existing artifact file. modify Modifies image or artifact file. cp cp <src> <dst> cat cat [artifact|sdimg|uefiimg]:<filepath> install install -m<permissions> <src> <dst> help, h Shows a list of commands or help for one command GLOBAL OPTIONS: --help, -h show help --version, -v print the version