{"action":"created","issue":{"url":"https://api.github.com/repos/endocode/fleet/issues/19","repository_url":"https://api.github.com/repos/endocode/fleet","labels_url":"https://api.github.com/repos/endocode/fleet/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/endocode/fleet/issues/19/comments","events_url":"https://api.github.com/repos/endocode/fleet/issues/19/events","html_url":"https://github.com/endocode/fleet/pull/19","id":139638606,"number":19,"title":"fleetctl: make the replace option work correct DesiredState","user":{"login":"dongsupark","id":10096906,"avatar_url":"https://avatars.githubusercontent.com/u/10096906?v=3","gravatar_id":"","url":"https://api.github.com/users/dongsupark","html_url":"https://github.com/dongsupark","followers_url":"https://api.github.com/users/dongsupark/followers","following_url":"https://api.github.com/users/dongsupark/following{/other_user}","gists_url":"https://api.github.com/users/dongsupark/gists{/gist_id}","starred_url":"https://api.github.com/users/dongsupark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongsupark/subscriptions","organizations_url":"https://api.github.com/users/dongsupark/orgs","repos_url":"https://api.github.com/users/dongsupark/repos","events_url":"https://api.github.com/users/dongsupark/events{/privacy}","received_events_url":"https://api.github.com/users/dongsupark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-09T17:02:50Z","updated_at":"2016-03-10T17:22:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/endocode/fleet/pulls/19","html_url":"https://github.com/endocode/fleet/pull/19","diff_url":"https://github.com/endocode/fleet/pull/19.diff","patch_url":"https://github.com/endocode/fleet/pull/19.patch"},"body":"To be able to test ``fleetctl {load,submit,start} -replace foo.service``, ``DesiredState`` needs to be set correctly.\r\n\r\nThis PR depends on https://github.com/endocode/fleet/pull/18.\r\n\r\n/cc @tixxdz "},"comment":{"url":"https://api.github.com/repos/endocode/fleet/issues/comments/194965194","html_url":"https://github.com/endocode/fleet/pull/19#issuecomment-194965194","issue_url":"https://api.github.com/repos/endocode/fleet/issues/19","id":194965194,"user":{"login":"dongsupark","id":10096906,"avatar_url":"https://avatars.githubusercontent.com/u/10096906?v=3","gravatar_id":"","url":"https://api.github.com/users/dongsupark","html_url":"https://github.com/dongsupark","followers_url":"https://api.github.com/users/dongsupark/followers","following_url":"https://api.github.com/users/dongsupark/following{/other_user}","gists_url":"https://api.github.com/users/dongsupark/gists{/gist_id}","starred_url":"https://api.github.com/users/dongsupark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongsupark/subscriptions","organizations_url":"https://api.github.com/users/dongsupark/orgs","repos_url":"https://api.github.com/users/dongsupark/repos","events_url":"https://api.github.com/users/dongsupark/events{/privacy}","received_events_url":"https://api.github.com/users/dongsupark/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T17:22:34Z","updated_at":"2016-03-10T17:22:34Z","body":"FTR, this PR doesn't work as expected yet.\r\nThere have been 2 distinct issues:\r\n1. ``fleectl {submit,load,start} -replace foo.service`` hangs.\r\n2. foo.service is not replaced at all.\r\n\r\nThe issue 1 is done, at least when testing the current tree on CoreOS alpha (976). It does not hang any more.\r\n\r\nThe issue 2 still persists, so service is not replaced at all. This looks rather an architectural issue.\r\n\r\n``fleetctl cmd -replace foo.service`` actually sends ``HTTP PUT`` to ``fleetd``, which though does not update its existing unit. Apparently on the reconciliation side, the both unit hashes ``cJHash`` and ``dJHash`` show always the same as each other. No wonder, the unit does not get updated.\r\n\r\nAnd even after running ``fleetctl cmd -replace`` with a modified service file, ``/run/fleet/unit/foo.service`` does not change. That indicates that something should be triggered for updating the service file. While ``load/unload/reload``-ing units in agent & engine are possible, I don't see how it can be done from fleetctl. Still in progress."}}