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

Upgrading from 7.17.22-SNAPSHOT to 8.14.0-SNAPSHOT is broken #4755

Closed
rdner opened this issue May 15, 2024 · 7 comments
Closed

Upgrading from 7.17.22-SNAPSHOT to 8.14.0-SNAPSHOT is broken #4755

rdner opened this issue May 15, 2024 · 7 comments
Assignees
Labels
bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@rdner
Copy link
Member

rdner commented May 15, 2024

Failed build https://buildkite.com/elastic/elastic-agent/builds/8930#018f7c4e-abf5-45be-a774-41fa9a35fb3f

fixture.go:656: >> running binary with: [C:\Users\windows\AppData\Local\Temp\TestStandaloneUpgradeUpgrade_7.17.22-SNAPSHOT_to_8.14.0-SNAPSHOT_(privileged)2978752608\001\elastic-agent-7.17.22-SNAPSHOT-windows-x86_64\elastic-agent.exe version --binary-only --yaml]
    upgrade_standalone_test.go:68: 
        	Error Trace:	C:/Users/windows/agent/testing/integration/upgrade_standalone_test.go:68
        	            				C:/Users/windows/agent/testing/integration/upgrade_standalone_test.go:43
        	Error:      	Received unexpected error:
        	            	could not unmarshal agent version output: error: exit status 2, output: panic: proto: file "elastic-agent-client.proto" has a name conflict over proto.STOPPING
        	            		previously from: "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/control/proto"
        	            		currently from:  "github.com/elastic/elastic-agent-client/v7/pkg/proto"
        	            	See https://protobuf.dev/reference/go/faq#namespace-conflict
        	            	
        	            	
        	            	goroutine 1 [running]:
        	            	google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x1fbcc60?, 0xc0005765b0?}, {0x1fbcc60?, 0xc0005765f0})
        	            		/go/pkg/mod/google.golang.org/protobuf@v1.33.0/reflect/protoregistry/registry.go:56 +0x1e5
        	            	google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile.func1({0x1fda320, 0xc000557480})
        	            		/go/pkg/mod/google.golang.org/protobuf@v1.33.0/reflect/protoregistry/registry.go:154 +0x263
        	            	google.golang.org/protobuf/reflect/protoregistry.rangeTopLevelDescriptors({0x1fe2e50, 0xc000557180}, 0xc00061f790)
        	            		/go/pkg/mod/google.golang.org/protobuf@v1.33.0/reflect/protoregistry/registry.go:412 +0x2ce
        	            	google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc000008ed0, {0x1fe2e50?, 0xc000557180?})
        	            		/go/pkg/mod/google.golang.org/protobuf@v1.33.0/reflect/protoregistry/registry.go:149 +0x73e
        	            	google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x1927e23, 0x34}, {0x2e15580, 0x1308, 0x1308}, 0x8, 0x17, 0x0, 0x1, {0x1fc2a48, ...}, ...})
        	            		/go/pkg/mod/google.golang.org/protobuf@v1.33.0/internal/filedesc/build.go:112 +0x1d6
        	            	google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x1927e23, 0x34}, {0x2e15580, 0x1308, 0x1308}, 0x8, 0x17, 0x0, 0x1, {0x0, ...}, ...}, ...})
        	            		/go/pkg/mod/google.golang.org/protobuf@v1.33.0/internal/filetype/build.go:138 +0x199
        	            	github.com/elastic/elastic-agent-client/v7/pkg/proto.file_elastic_agent_client_proto_init()
        	            		/go/pkg/mod/github.com/elastic/elastic-agent-client/v7@v7.8.1/pkg/proto/elastic-agent-client.pb.go:2971 +0x258
        	            	github.com/elastic/elastic-agent-client/v7/pkg/proto.file_elastic_agent_client_future_proto_init()
        	            		/go/pkg/mod/github.com/elastic/elastic-agent-client/v7@v7.8.1/pkg/proto/elastic-agent-client-future.pb.go:1329 +0x30
        	            	github.com/elastic/elastic-agent-client/v7/pkg/proto.init.1()
        	            		/go/pkg/mod/github.com/elastic/elastic-agent-client/v7@v7.8.1/pkg/proto/elastic-agent-client-future.pb.go:1324 +0xf
        	            	
        	            	yaml: mapping values are not allowed in this context
        	Test:       	TestStandaloneUpgrade/Upgrade_7.17.22-SNAPSHOT_to_8.14.0-SNAPSHOT_(privileged)
@rdner rdner added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels May 15, 2024
@elasticmachine
Copy link
Collaborator

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

@rdner
Copy link
Member Author

rdner commented May 15, 2024

I can't see any recent changes in the 7.17 branch that could cause this. There is a client update elastic/beats#39224 on Apr 25 but that would've failed earlier.

@cmacknz
Copy link
Member

cmacknz commented May 15, 2024

@michel-laterman this definitely seems related to elastic/beats#39224

@michel-laterman
Copy link
Contributor

The initial error; where it can't get the starting agent version might be due to the 7.17.x builds including a hash in their version report, but the more recent ones do not:

https://github.com/elastic/beats/blob/7.17/x-pack/elastic-agent/pkg/agent/control/proto/control.pb.go#L182-L195

@rdner
Copy link
Member Author

rdner commented May 15, 2024

Disabling the version until this is resolved #4758

@michel-laterman
Copy link
Contributor

actually this error occurs when running elastic-agent version on 7.17.22-snapshot

@ycombinator
Copy link
Contributor

Fixed via elastic/beats#39585

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

No branches or pull requests

5 participants