Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1518706

Summary: systemd-run fails with a command longer than 2048 characters
Product: Red Hat Enterprise Linux 7 Reporter: Jan Chaloupka <jchaloup>
Component: systemdAssignee: systemd-maint
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: jchaloup, jsynacek, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-05 08:05:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jan Chaloupka 2017-11-29 13:54:47 UTC
Description of problem:
When running the systemd-run with a command longer than 2048 characters the command fails with the following message:

Failed to start transient service unit: Invalid argument

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
/bin/systemd-run "--unit=kubelet-413137689_8.service" "--slice=runtime.slice" "--remain-after-exit" "/usr/bin/docker" "run" "--name=kubelet" "--rm" "--privileged" "--net=host" "--pid=host" "-e" "HOST=/rootfs" "-e" "HOST_ETC=/host-etc" "-v" "/etc/localtime:/etc/localtime:ro" "-v" "/etc/machine-id:/etc/machine-id:ro" "-v" "/etc/systemd/system:/host-etc/systemd/system" "-v" "/home/origin/src/" "-v" "/lib/modules:/lib/modules" "-v" "/:/rootfs:ro,rslave" "-v" "/run:/run" "-v" "/sys/fs/cgroup:/sys/fs/cgroup:rw" "-v" "/sys:/sys:rw" "-v" "/usr/bin/docker:/usr/bin/docker:ro" "-v" "/var/lib/cni:/var/lib/cni" "-v" "/var/lib/docker:/var/lib/docker" "-v" "/var/lib/kubelet:/var/lib/kubelet:rw,rslave" "-v" "/var/log:/var/log" "-v" "/home/origin/src/" "" "/hyperkube" "kubelet" "--containerized" "--kubelet-cgroups=/kubelet.slice" "--cgroup-root=/" "--kubeconfig" "/etc/kubernetes/kubeconfig" "--address" "" "--port" "10250" "--read-only-port" "10255" "--root-dir" "/var/lib/kubelet" "--volume-stats-agg-period" "10s" "--allow-privileged" "true" "--serialize-image-pulls" "false" "--pod-manifest-path" "/home/origin/src/" "--file-check-frequency" "10s" "--docker-disable-shared-pid=false" "--pod-cidr" "" "--eviction-pressure-transition-period" "30s" "--feature-gates" "" "--eviction-hard" "memory.available<250Mi,nodefs.available<10%%,nodefs.inodesFree<5%%" "--eviction-minimum-reclaim" "nodefs.available=5%%,nodefs.inodesFree=5%%" "--v" "4" "--logtostderr" "--network-plugin=kubenet" "--cni-bin-dir" "/home/origin/src/" "--cni-conf-dir" "/home/origin/src/" "--hostname-override" "ip-172-18-7-50.ec2.internal" "--container-runtime=docker" "--network-plugin=" "--cni-bin-dir=" "--cgroup-driver=systemd" "--cgroups-per-qos=true" "--cgroup-root=/"

Actual results:
Failed to start transient service unit: Invalid argument

Expected results:
Running as unit kubelet-413137689_8.service.

Additional info:

Comment 2 Jan Synacek 2017-12-04 07:34:06 UTC
Please attach the output of 'journalctl -b -u kubelet-413137689_8.service -o verbose' or whatever the service name is when you are running the command.

Comment 3 Jan Chaloupka 2017-12-04 13:33:32 UTC
The service is not created so I can't provide any logs wrt. the service.

Comment 4 Jan Synacek 2017-12-05 08:05:35 UTC
Fixed by bz#1503106.

*** This bug has been marked as a duplicate of bug 1503106 ***