Skip to content

node-bootstrapper service account does not exist #15869

Closed

Description

@kwoodson

When going to 3.7 the node-bootstrapper service account is missing.

Version

[root@ip-172-31-48-185 ~]# oc version
oc v3.7.0-0.27.0
kubernetes v1.7.0+695f48a16f
openshift v3.7.0-0.27.0
kubernetes v1.7.0+695f48a16f

Steps To Reproduce
  1. Install a 3.7.0-0.27.0
  2. Verify node-bootstrapper service account does not exist
Current Result

No exist!

Expected Result

Exists

Additional Information

This was working with 3.6.171. Something probably regressed a patch or something. Please put it back so I can test scale group configurations with node bootstrapping!

atomic-openshift-3.7.0-0.27.0.git.0.071dcde.el7.x86_64
tuned-profiles-atomic-openshift-node-3.7.0-0.27.0.git.0.071dcde.el7.x86_64
atomic-openshift-excluder-3.7.0-0.27.0.git.0.071dcde.el7.noarch
atomic-openshift-clients-3.7.0-0.27.0.git.0.071dcde.el7.x86_64
atomic-openshift-master-3.7.0-0.27.0.git.0.071dcde.el7.x86_64
atomic-openshift-node-3.7.0-0.27.0.git.0.071dcde.el7.x86_64
atomic-openshift-docker-excluder-3.7.0-0.27.0.git.0.071dcde.el7.noarch

Activity

  1. smarterclayton commented on Aug 18, 2017

    @smarterclayton
    Contributor

    Was removed in 181f498 which has @deads2k name on it.

  2. smarterclayton commented on Aug 18, 2017

    @smarterclayton
    Contributor

    We'll need that service account and role (or a close equivalent back). Our current plan is for the automation to grab that kubeconfig and place it into launch config, and then periodically refresh the launch config every X hours by creating a new service account token.

  3. enj commented on Aug 19, 2017

    @enj
    Contributor

    Why does it have to be a bootstrap role? Can't you just make whatever role and bindings you need with ansible?

  4. kwoodson commented on Aug 19, 2017

    @kwoodson
    Author

    With the latest 3.7.0-0.27 build that I'm using I am receiving node csr's that look like this:

    node-csr-Wq35fUiyWTh8CRPMUVdqqFVr2ocKfto24vRRJcyrFYc

    Then once approved I don't see the Issued on the condition. Is this something that has changed or was regressed from 3.6.171? I had written up a module that takes a list of node names and matches them to the incoming csr names that included the node.

    NAME AGE REQUESTOR CONDITION
    node-csr-Wq35fUiyWTh8CRPMUVdqqFVr2ocKfto24vRRJcyrFYc 9m system:serviceaccount:openshift-infra:node-bootstrapper Approved

    I never see the node request its next certificate. Probably because it wasn't issued.

    They used to look like this:
    node-bootstrapper-client-ip-172-31-51-246-ec2-internal
    node-bootstrapper-server-ip-172-31-51-246-ec2-internal

    I updated my provisioning https://github.com/openshift/openshift-ansible/pull/5011/files to create the bootstrap service account, grant the permissions, create the kubeconfig for node-bootstrapper, and then write it to disk.

    If the account changes or gets updated we'll need to update the code in that PR.

  5. smarterclayton commented on Aug 19, 2017

    @smarterclayton
    Contributor
  6. enj commented on Aug 19, 2017

    @enj
    Contributor

    Sounds reasonable.

    @openshift/sig-security

    @tiran I believe you were tasked with understanding this area.

  7. smarterclayton commented on Aug 21, 2017

    @smarterclayton
    Contributor
  8. tiran commented on Aug 21, 2017

    @tiran
    Contributor

    @smarterclayton

    @simo5 and I looked into the code. We cannot simple revert the commit because the old code gone for good and has been replaced with RBAC rules. It also shouldn't be necessary to create system:node-bootstrapper in OpenShift any more. Upstream k8s code does it for us in rbac/bootstrappolicy/policy.go:

    https://github.com/openshift/origin/blob/master/vendor/k8s.io/kubernetes/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go#L275-L280

    ObjectMeta: metav1.ObjectMeta{Name: "system:node-bootstrapper"},
        Rules: []rbac.PolicyRule{
            // used to create a certificatesigningrequest for a node-specific client certificate, and watch for it to be signed
            rbac.NewRule("create", "get", "list", "watch").Groups(certificatesGroup).Resources("certificatesigningrequests").RuleOrDie(),
    },
    

    The rule looks exactly the same as the old rule that was removed in 181f498. Do we only have to create the node-bootstrapper SA and we are good again?

  9. smarterclayton commented on Aug 22, 2017

    @smarterclayton
    Contributor
  10. added
    kind/bug
    on Aug 22, 2017
  11. added a commit that references this issue on Aug 24, 2017
    459c2ef
  12. smarterclayton commented on Aug 30, 2017

    @smarterclayton
    Contributor

    @kwoodson you should be fixed on master now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

component/authkind/bugpriority/P0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions