Skip to content

[Enhancement] Rename CPU architectures for deb and rpm packages #2598

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

Closed
saratvemulapalli opened this issue Apr 28, 2021 · 23 comments
Closed
Labels
deb/rpm enhancement Enhancement or improvement to existing feature or request

Comments

@saratvemulapalli
Copy link
Member

Describe the bug
The CPU architecture was renamed for archives in #612 to keep it consistent with plugins and trends on google.
But the deb and rpm packages used amd64 and x86_64.
How do we like to rename them?

@dblock dblock transferred this issue from opensearch-project/OpenSearch Sep 7, 2021
@bbarani bbarani self-assigned this Sep 7, 2021
@peternied peternied assigned stockholmux and unassigned bbarani Sep 14, 2021
@peternied
Copy link
Member

@stockholmux Could you provide input into what you'd like the names to be for those artifacts?

@stockholmux
Copy link
Member

@peternied Arm: arm64, x86-64 bit: x64 unless there is a specific reason why they need to be different in the context of RPM or DEB (i.e. maybe you know better?).

@gaiksaya
Copy link
Member

Our artifacts are currently names as arm64 and x64. Can you elaborate @saratvemulapalli what are you suggesting here?
As I understand you want them to be arm64 and x64 right? If yes we can close this issue as this is already in scope of opensearch-project/opensearch-build#27 and opensearch-project/opensearch-build#28

@saratvemulapalli
Copy link
Member Author

@gaiksaya We generate bunch of artifacts:

  1. ARM -> arm64
  2. x86/64 -> x64
  3. RPM package -> x86_64
  4. DEB package -> amd64

To make 3 and 4 consistent with 1, 2 we need to change the artifact naming to arm64 and x64.

ubuntu@user~> /OpenSearch/distribution/packages/rpm/build/distributions$ ls
opensearch-min-2.0.0-SNAPSHOT.x86_64.rpm
ubuntu@user~> /OpenSearch/distribution/packages/deb/build/distributions$ ls
opensearch-min_2.0.0-SNAPSHOT_amd64.changes  opensearch-min_2.0.0-SNAPSHOT_amd64.deb

Its probably similar for OpenSearch dashboards as well.

@gaiksaya
Copy link
Member

So its on the min side of things and not the bundle right?

@saratvemulapalli
Copy link
Member Author

Yup this is the min but we need to co-ordinate across the project.

So next steps:

  1. Finalize the naming convention. @opensearch-build and @stockholmux
  2. Open up issues in OpenSearch and Dashboard to track these naming convention changes.
  3. Update min bundle scripts for RPM and DEB packages. (Probably tracked through [Meta] OpenSearch / OpenSearch Dashboards - Support for RPM distribution opensearch-build#27 and OpenSearch / OpenSearch Dashboards - DEB distribution (X64) opensearch-build#28)

@stockholmux
Copy link
Member

@saratvemulapalli We've not used x86_64 nor amd64 in the project artifacts previously (nor in Open Distro).

We should continue using only x64 since its functionally equal to x86_64 and amd64.

[Unless someone knows better]

@abhinavGupta16
Copy link

[triage] We'll follow the same naming convention as tar artifacts

@peterzhuamazon
Copy link
Member

Re-Open this issue as it is related and the issue still persist.

@peterzhuamazon
Copy link
Member

@saratvemulapalli seems like this will need to be put into the picture as well.

@saratvemulapalli
Copy link
Member Author

@peterzhuamazon sure.
You do have couple of pro's and con's for each approach. Could you list them here and lets take feedback from the community and the product team.

Depending what we decide on the naming, we should open up issues in OpenSearch, Dashboards to make those changes.
I would not tweak the names in our build scripts instead the code bases should generate the name we are looking for.

@peterzhuamazon
Copy link
Member

# Current naming pattern for rpm in yum and recommended by Spot and used by nearly everyone
<>-2.0.0-1.x86_64.rpm

# Help us maintain the same naming convention to all artifacts
<>-2.0.0-x64.rpm

Technically it does not matter because rpm use internal metadata to check, thus filename is just a pointer after all.

Issue:

  • If user using the same pattern like before to write their scripts, yum install/update <>-2.0.0-1-x86_64 will fail, need to change to use yum install/update <>-2.0.0-x64 or yum install/update <>-2.0.0 or yum install/update <>
  • Not matching with the common pattern.
  • Dashboards already rename to <>-2.0.0-x64.rpm in their repo.

@stockholmux
Copy link
Member

@peterzhuamazon So, from your description it sounds like this is a user expectation more than a technical issue?

@peterzhuamazon
Copy link
Member

@peterzhuamazon So, from your description it sounds like this is a user expectation more than a technical issue?

Yes.

@peterzhuamazon
Copy link
Member

@bbarani @CEHENKLE @stockholmux since dashboards already have their rpm name match tarball patterns, we would suggest core opensearch to also change the name to the same convention.

We current face issues when trying to upload min rpm into s3 due to the name differences:

+ cp /var/jenkins/workspace/Playground/tianleh-test/tianle-opensearch-build-3-22/builds/opensearch/rpm/dist/opensearch-min-1.3.0-SNAPSHOT-linux-x64.rpm /var/jenkins/workspace/Playground/tianleh-test/tianle-opensearch-build-3-22/builds/opensearch/rpm/dist/opensearch-min-1.3.0-SNAPSHOT-linux-x64-latest.rpm
cp: cannot stat '/var/jenkins/workspace/Playground/tianleh-test/tianle-opensearch-build-3-22/builds/opensearch/rpm/dist/opensearch-min-1.3.0-SNAPSHOT-linux-x64.rpm': No such file or directory

@peterzhuamazon
Copy link
Member

Standard:

opensearch-min-1.3.0-linux-x64.rpm
opensearch-min-1.3.0-linux-arm64.rpm

@peterzhuamazon peterzhuamazon transferred this issue from opensearch-project/opensearch-build Mar 25, 2022
@peterzhuamazon peterzhuamazon changed the title Rename CPU architectures for deb and rpm packages [Enhancement] Rename CPU architectures for deb and rpm packages Mar 25, 2022
@peterzhuamazon
Copy link
Member

Possible issues if we directly rename inside core:
opensearch-project/OpenSearch-Dashboards#1401

@saratvemulapalli
Copy link
Member Author

@peterzhuamazon could you summarize whats needed from OpenSearch core?
Did we decide on the right naming convention ?

@peterzhuamazon
Copy link
Member

@saratvemulapalli We dont really need to do this now as the final release artifact will be rename to the correct name anyway.

@saratvemulapalli
Copy link
Member Author

@saratvemulapalli We dont really need to do this now as the final release artifact will be rename to the correct name anyway.

Cool. I'll close this one for now. Feel free to re-open if we need it.

@dblock
Copy link
Member

dblock commented Jun 14, 2022

I'm reading this issue and it sounds like OpenSearch generates opensearch-min-2.0.0-SNAPSHOT.x86_64.rpm and it should really be opensearch-min-2.0.0-SNAPSHOT.arm64.rpm. To work around this we are doing renaming in opensearch-build? As @saratvemulapalli points out in #2598 (comment), we should make this change here and not rename files later in distribution scripts. @peterzhuamazon WDYT? Want to give it a try?

@peterzhuamazon
Copy link
Member

Hi @dblock,
It should be x64 not arm64 for x86_64, tho it really does not matter as that is not the product we will release anyway.
Plus the manifest will also use the existing name of the file so it will not mess up anything is the build.

Thanks.

@peterzhuamazon
Copy link
Member

Also @dblock I fear the changes might somehow cause the min rpm to not able to install like in OSD, and that is why I am very hesitate to even change this, see:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deb/rpm enhancement Enhancement or improvement to existing feature or request
Projects
None yet
Development

No branches or pull requests

8 participants