Merge pull request #3920 from aleerizw/fix/add_service_extension

Automatic merge from submit-queue.

Added .service to hooks unit files

Recent versions of systemd (version 229 at least) included in Ubuntu
16.04 and Debian 9 require the systemd unit files to have a .service
extension.

Fixes #3919

Signed-off-by: Ali Rizwan <ari@hellofresh.com>
This commit is contained in:
Kubernetes Submit Queue 2017-11-26 14:29:24 -08:00 committed by GitHub
commit 13451ad650
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -53,12 +53,12 @@ func (h *HookBuilder) Build(c *fi.ModelBuilderContext) error {
var name string
switch hook.Name {
case "":
name = fmt.Sprintf("kops-hook-%d", j)
name = fmt.Sprintf("kops-hook-%d.service", j)
if isInstanceGroup {
name = fmt.Sprintf("%s-ig", name)
name = fmt.Sprintf("%s-ig.service", name)
}
default:
name = hook.Name
name = fmt.Sprintf("%s.service", hook.Name)
}
if _, found := hookNames[name]; found {