Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to upgrade in unprivileged mode on Windows #4646

Closed
blakerouse opened this issue Apr 30, 2024 · 1 comment · Fixed by #4649
Closed

Unable to upgrade in unprivileged mode on Windows #4646

blakerouse opened this issue Apr 30, 2024 · 1 comment · Fixed by #4649
Assignees
Labels
blocker bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@blakerouse
Copy link
Contributor

I created PR #4642 that adds upgrade testing for Windows when installed in unprivileged mode. It seems to have identified an issue where the elastic-agent-user is unable to create the symlink upon upgrade.

    fixture.go:656: >> running binary with: [C:\Users\windows\AppData\Local\Temp\TestStandaloneUpgradeWithGPGFallback2716514207\001\elastic-agent-8.14.0-SNAPSHOT-windows-x86_64\elastic-agent.exe install --force --non-interactive --unprivileged]
    fixture.go:656: >> running binary with: [C:\Program Files\Elastic\Agent\elastic-agent.exe status --output json]
    upgrader.go:295: Upgrading from version "8.14.0-SNAPSHOT-8bfc26c3063c53a7dae338af731e055e2819a456" to version "8.14.0-SNAPSHOT-372976eba8bcdf22e5a3a96c057f39b69bee1a13"
    fixture.go:656: >> running binary with: [C:\Program Files\Elastic\Agent\elastic-agent.exe upgrade 8.14.0-SNAPSHOT --pgp abcDEFgGIN PGP PUBLIC KEY BLOCK-----
        Version: GnuPG v2.0.14 (GNU/Linux)
        
        mQENBFI3HsoBCADXDtbNJnxbPqB1vDNtCsqhe49vFYsZN9IOZsZXgp7aHjh6CJBD
        A+bGFOwyhbd7at35jQjWAw1O3cfYsKAmFy+Ar3LHCMkV3oZspJACTIgCrwnkic/9
        CUliQe324qvObU2QRtP4Fl0zWcfb/S8UYzWXWIFuJqMvE9MaRY1bwUBvzoqavLGZ
        j3SF1SPO+TB5QrHkrQHBsmX+Jda6d4Ylt8/t6CvMwgQNlrlzIO9WT+YN6zS+sqHd
        1YK/aY5qhoLNhp9G/HxhcSVCkLq8SStj1ZZ1S9juBPoXV1ZWNbxFNGwOh/NYGldD
        2kmBf3YgCqeLzHahsAEpvAm8TBa7Q9W21C8vABEBAAG0RUVsYXN0aWNzZWFyY2gg
        KEVsYXN0aWNzZWFyY2ggU2lnbmluZyBLZXkpIDxkZXZfb3BzQGVsYXN0aWNzZWFy
        Y2gub3JnPokBOAQTAQIAIgUCUjceygIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgEC
        F4AACgkQ0n1mbNiOQrRzjAgAlTUQ1mgo3nK6BGXbj4XAJvuZDG0HILiUt+pPnz75
        nsf0NWhqR4yGFlmpuctgCmTD+HzYtV9fp9qW/bwVuJCNtKXk3sdzYABY+Yl0Cez/
        7C2GuGCOlbn0luCNT9BxJnh4mC9h/cKI3y5jvZ7wavwe41teqG14V+EoFSn3NPKm
        TxcDTFrV7SmVPxCBcQze00cJhprKxkuZMPPVqpBS+JfDQtzUQD/LSFfhHj9eD+Xe
        8d7sw+XvxB2aN4gnTlRzjL1nTRp0h2/IOGkqYfIG9rWmSLNlxhB2t+c0RsjdGM4/
        eRlPWylFbVMc5pmDpItrkWSnzBfkmXL3vO2X3WvwmSFiQbkBDQRSNx7KAQgA5JUl
        zcMW5/cuyZR8alSacKqhSbvoSqqbzHKcUQZmlzNMKGTABFG1yRx9r+wa/fvqP6OT
        RzRDvVS/cycws8YX7Ddum7x8uI95b9ye1/Xy5noPEm8cD+hplnpU+PBQZJ5XJ2I+
        1l9Nixx47wPGXeClLqcdn0ayd+v+Rwf3/XUJrvccG2YZUiQ4jWZkoxsA07xx7Bj+
        Lt8/FKG7sHRFvePFU0ZS6JFx9GJqjSBbHRRkam+4emW3uWgVfZxuwcUCn1ayNgRt
        KiFv9jQrg2TIWEvzYx9tywTCxc+FFMWAlbCzi+m4WD+QUWWfDQ009U/WM0ks0Kww
        EwSk/UDuToxGnKU2dQARAQABiQEfBBgBAgAJBQJSNx7KAhsMAAoJENJ9ZmzYjkK0
        c3MIAIE9hAR20mqJWLcsxLtrRs6uNF1VrpB+4n/55QU7oxA1iVBO6IFu4qgsF12J
        TavnJ5MLaETlggXY+zDef9syTPXoQctpzcaNVDmedwo1SiL03uMoblOvWpMR/Y0j
        6rm7IgrMWUDXDPvoPGjMl2q1iTeyHkMZEyUJ8SKsaHh4jV9wp9KmC8C+9CwMukL7
        vM5w8cgvJoAwsp3Fn59AxWthN3XJYcnMfStkIuWgR7U2r+a210W6vnUxU4oN0PmM
        cursYPyeV0NX/KQeUeNMwGTFB6QHS/anRaGQewijkrYYoTNtfllxIu9XYmiBERQ/
        qPDlGRlOgVTd9xUfHFkzB52c70E=
        =92oX
        -----END PGP PUBLIC KEY BLOCK-----
        ]
    upgrade_gpg_test.go:91: 
        	Error Trace:	C:/Users/windows/agent/testing/integration/upgrade_gpg_test.go:91
        	Error:      	Received unexpected error:
        	            	failed to start agent upgrade to version "8.14.0": exit status 1
        	            	Error: Failed trigger upgrade of daemon: failed to update agent symlink: symlink C:\Program Files\Elastic\Agent\data\elastic-agent-8.14.0-SNAPSHOT-372976\elastic-agent.exe C:\Program Files\Elastic\Agent\elastic-agent.exe.prev: A required privilege is not held by the client.
        	            	rolling back install: restoring symlink to "C:\\Program Files\\Elastic\\Agent\\data\\elastic-agent-8.14.0-SNAPSHOT-8bfc26\\elastic-agent" failed: failed to update agent symlink: symlink C:\Program Files\Elastic\Agent\data\elastic-agent-8.14.0-SNAPSHOT-8bfc26\elastic-agent.exe C:\Program Files\Elastic\Agent\elastic-agent.exe.prev: A required privilege is not held by the client.
        	            	For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/8.14/fleet-troubleshooting.html
        	Test:       	TestStandaloneUpgradeWithGPGFallback

For confirmed bugs, please report:

  • Version: 8.14
  • Operating System: Windows
@blakerouse blakerouse added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team blocker labels Apr 30, 2024
@blakerouse blakerouse self-assigned this Apr 30, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants