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

t3c support non-yum/rpm systems #6205

Open
ocket8888 opened this issue Sep 13, 2021 · 2 comments
Open

t3c support non-yum/rpm systems #6205

ocket8888 opened this issue Sep 13, 2021 · 2 comments
Labels
cache-config Cache config generation improvement The functionality exists but it could be improved in some way. low difficulty the estimated level of effort to resolve this issue is low low impact affects only a small portion of a CDN, and cannot itself break one

Comments

@ocket8888
Copy link
Contributor

This Improvement request (usability, performance, tech debt, etc.) affects these Traffic Control components:

  • Traffic Control Cache Config (T3C, formerly ORT)

Current behavior:

Currently, t3c uses rpm on all apply runs (even in report mode or with -a/--service-action set to none and -k/--install-packages not given) to check if ATS is installed. If /bin/rpm does not exist, this will cause the run to fail. Likewise -k/--install-packages will fail if /usr/bin/yum does not exist.

New behavior:

Ideally, t3c would support the most popular package managers (and look in PATH instead of a hard-coded file path):

  • apt
  • yum
  • dnf
  • apk
  • pacman

That would allow it to more easily support more platforms. The system to use could be determined at runtime, or it could be configured on the cache server's Profile, since the format of version strings vary between these systems, and the Parameters are where those version strings are specified. It could also try to convert from a standard format to whatever the system's package management system uses, but that sounds much harder.

@ocket8888 ocket8888 added low impact affects only a small portion of a CDN, and cannot itself break one cache-config Cache config generation improvement The functionality exists but it could be improved in some way. labels Sep 13, 2021
@mikeV02
Copy link
Contributor

mikeV02 commented Nov 22, 2021

Hi,

I have made some efforts to make it work with "dpkg" for Debian based Linux. They are not very elegant, but with this I have made it to work to sync my ATS servers installed on Debian with TrafficOps.

I modified cache-config/t3c-apply/util/util.go on line 302, and added the following:
util go

Then, I modified cache-config/t3c-apply/torequest/torequest.go on line 34 to make use of the module "bufio", and bellow on line 583 I modified to add a check for the os-release file in /etc (not elegant) to check if it was running CentOS or Debian/Ubuntu.
torequest go

@mikeV02
Copy link
Contributor

mikeV02 commented Nov 22, 2021

Hello,

I forgot to mention that on line 575 for the file cache-config/t3c-apply/config/config.go, I commented out the check for "chkconfig" command.
chkconfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cache-config Cache config generation improvement The functionality exists but it could be improved in some way. low difficulty the estimated level of effort to resolve this issue is low low impact affects only a small portion of a CDN, and cannot itself break one
Projects
None yet
Development

No branches or pull requests

2 participants