Skip to content

feat: add new command to migrate onhost folders#1815

Merged
vjripoll merged 5 commits intorestructure-on-host-foldersfrom
add-new-command-to-migrate-onhost-folders
Nov 5, 2025
Merged

feat: add new command to migrate onhost folders#1815
vjripoll merged 5 commits intorestructure-on-host-foldersfrom
add-new-command-to-migrate-onhost-folders

Conversation

@vjripoll
Copy link
Contributor

@vjripoll vjripoll commented Oct 30, 2025

What this PR does / why we need it

THIESE CHANGES SHOULD BE PLANNED TO BE DELETED IN A NEAR FUTURE

Add new command into the newrelic-agent-control-cli to copy and rename all the old folders from the current installations to the new paths and names, the content is going to be the same

image image

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged. You can also add Jira ticket references if appropriate.)

  • fixes #

Special notes for your reviewer

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Provided a meaningful title following conventional commit style.
  • Included a detailed description for the Pull Request.
  • Documentation under docs is aligned with the change.
  • Follows guidelines for Pull Requests in CONTRIBUTING.md.
  • Follows log level guidelines.

@vjripoll vjripoll changed the base branch from main to restructure-on-host-folders October 30, 2025 10:30
@vjripoll vjripoll force-pushed the add-new-command-to-migrate-onhost-folders branch 3 times, most recently from 3727632 to c6ceb4a Compare October 31, 2025 10:08
@vjripoll vjripoll marked this pull request as ready for review October 31, 2025 10:30
@vjripoll vjripoll requested a review from a team as a code owner October 31, 2025 10:30
@vjripoll vjripoll force-pushed the add-new-command-to-migrate-onhost-folders branch 3 times, most recently from 2ec9929 to 29763c9 Compare October 31, 2025 13:20
Copy link
Member

@paologallinaharbur paologallinaharbur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, only ebpf seems to be missing.

code structure can be improved, but I am not sure if it is worth it considering that it is just a migration tool

@vjripoll vjripoll force-pushed the add-new-command-to-migrate-onhost-folders branch from d856dc8 to eb16e33 Compare November 3, 2025 08:57
Copy link
Contributor

@danielorihuela danielorihuela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left nit's. Not sure how worth it is if we plan on removing it long term. Great work!!!

@vjripoll vjripoll force-pushed the add-new-command-to-migrate-onhost-folders branch from b064a60 to 5f4f126 Compare November 4, 2025 14:37
@vjripoll vjripoll force-pushed the restructure-on-host-folders branch from 54a778b to 9343dc5 Compare November 4, 2025 15:06
@vjripoll vjripoll force-pushed the add-new-command-to-migrate-onhost-folders branch 2 times, most recently from ed5b41c to 34cd668 Compare November 4, 2025 18:44
@vjripoll vjripoll force-pushed the add-new-command-to-migrate-onhost-folders branch from 34cd668 to 20d49d3 Compare November 4, 2025 18:57
for (agent_id, _) in sub_agents_cfg.agents {
let infra_values_persister =
ValuesPersisterFile::new(self.local_dir.join(SUB_AGENT_DIR));
let infra_values_persister = ValuesPersisterFile::new(self.local_dir.clone());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change belonging to this PR?

otel_agent_values_path: PathBuf::from(
"/etc/newrelic-agent-control/fleet/agents.d/nrdot/values",
),
otel_agent_values_path: PathBuf::from("/etc/newrelic-agent-control/local-data/nrdot"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, isn't related to an other PR?

@vjripoll vjripoll merged commit 34c3ac5 into restructure-on-host-folders Nov 5, 2025
24 checks passed
@vjripoll vjripoll deleted the add-new-command-to-migrate-onhost-folders branch November 5, 2025 08:41
vjripoll added a commit that referenced this pull request Nov 5, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 5, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 5, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 5, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 5, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 5, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 5, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 5, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 5, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 6, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 6, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 6, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 6, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 6, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 6, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 6, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 6, 2025
* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
vjripoll added a commit that referenced this pull request Nov 6, 2025
* restruture on host folder and names

* feat: add new command to migrate onhost folders (#1815)

* feat: new command to migrate old folder to new ones

* fix command name and check logic

* simplify the check logic to check only for local paths

* fix more comments and simplify

* move from statics agents names to scrapping fleet/agents.d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments