elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
1.39k stars 24.87k forks source link

[CI] PackagesSecurityAutoConfigurationTests test20SecurityNotAutoConfiguredOnReInstallation failing #112635

Open elasticsearchmachine opened 2 months ago

elasticsearchmachine commented 2 months ago

Build Scans:

Reproduction Line:

null

Applicable branches: 8.15

Reproduces locally?: N/A

Failure History: See dashboard&_a=(controlGroupInput:(chainingSystem:HIERARCHICAL,controlStyle:twoLine,ignoreParentSettings:(ignoreFilters:!f,ignoreQuery:!f,ignoreTimerange:!f,ignoreValidations:!t),panels:('0c0c9cb8-ccd2-45c6-9b13-96bac4abc542':(explicitInput:(dataViewId:fbbdc689-be23-4b3d-8057-aa402e9ed0c5,enhancements:(),fieldName:task.keyword,grow:!t,id:'0c0c9cb8-ccd2-45c6-9b13-96bac4abc542',searchTechnique:wildcard,selectedOptions:!(),singleSelect:!t,title:'Gradle%20Task',width:medium),grow:!t,order:0,type:optionsListControl,width:small),'144933da-5c1b-4257-a969-7f43455a7901':(explicitInput:(dataViewId:fbbdc689-be23-4b3d-8057-aa402e9ed0c5,enhancements:(),fieldName:name.keyword,grow:!t,id:'144933da-5c1b-4257-a969-7f43455a7901',searchTechnique:wildcard,selectedOptions:!('test20SecurityNotAutoConfiguredOnReInstallation'),title:Test,width:medium),grow:!t,order:2,type:optionsListControl,width:medium),'4e6ad9d6-6fdc-4fcc-bf1a-aa6ca79e0850':(explicitInput:(dataViewId:fbbdc689-be23-4b3d-8057-aa402e9ed0c5,enhancements:(),fieldName:className.keyword,grow:!t,id:'4e6ad9d6-6fdc-4fcc-bf1a-aa6ca79e0850',searchTechnique:wildcard,selectedOptions:!('org.elasticsearch.packaging.test.PackagesSecurityAutoConfigurationTests'),title:Suite,width:medium),grow:!t,order:1,type:optionsListControl,width:medium)))))

Failure Message:

java.lang.RuntimeException: Force upgrading distribution org.elasticsearch.packaging.util.Distribution@588f55df failed: exitCode = [1] stdout = [] stderr = [error: elasticsearch-0:8.15.2~SNAPSHOT-1.x86_64: erase failed
[/usr/lib/tmpfiles.d/elasticsearch.conf:1] Line references path below legacy directory /var/run/, updating /var/run/elasticsearch → /run/elasticsearch; please update the tmpfiles.d/ drop-in file accordingly.]

Issue Reasons:

Note: This issue was created using new test triage automation. Please report issues or feedback to es-delivery.

elasticsearchmachine commented 2 months ago

Pinging @elastic/es-delivery (Team:Delivery)

elasticsearchmachine commented 2 months ago

This has been muted on branch main

Mute Reasons:

Build Scans:

elasticsearchmachine commented 2 months ago

Pinging @elastic/es-security (Team:Security)

gwbrown commented 2 months ago

I looked at this for risk triage, and I'm not sure what to make of this. The failure doesn't appear to be directly related to what the test case is testing the test case forcibly reinstalls the package and checks that we haven't recreated the keystore, but the line that fails is the one that forcibly reinstalls the package: installation = Packages.forceUpgradePackage(sh, distribution);

@mark-vieira can you add any insight as to the root cause and if there's a cause in Security code that I'm missing?

mark-vieira commented 1 month ago

This looks to be some fallout from changes to recent systemd versions. We could switch to using /run in our RPM packages but I'm not sure how that would affect old versions and back compat. It's also not clear why this is "failing" this command. Perhaps there's some flag we can pass or something to make this lenient and not blow up on this warning?