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

geneos move does not work when specifying a type #192

Open
rcanillas-itrs opened this issue Dec 21, 2023 · 1 comment
Open

geneos move does not work when specifying a type #192

rcanillas-itrs opened this issue Dec 21, 2023 · 1 comment

Comments

@rcanillas-itrs
Copy link

rcanillas-itrs commented Dec 21, 2023

Versions:

[rcanillas@MNLP179-alma:~]$ cat /etc/centos-release
AlmaLinux release 8.9 (Midnight Oncilla)
[rcanillas@MNLP179-alma:~]$ geneos -v
geneos version v1.11.2

Current running instances:

[rcanillas@MNLP179-alma:~]$ geneos ps
Type      Name          Host       PID  Ports        User       Group      Starttime                  Version                Home
gateway   MNLP179-alma  localhost  870  [7039]       rcanillas  rcanillas  2023-12-21T15:18:50+08:00  active_prod:6.6.0+el8  /home/rcanillas/geneos/gateway/gateways/MNLP179-alma
licd      MNLP179-alma  localhost  876  [7041 7853]  rcanillas  rcanillas  2023-12-21T15:18:51+08:00  active_prod:6.5.0+el8  /home/rcanillas/geneos/licd/licds/MNLP179-alma
netprobe  localhost     localhost  756  [7036]       rcanillas  rcanillas  2023-12-21T13:36:09+08:00  active_prod:6.6.0+el8  /home/rcanillas/geneos/netprobe/netprobes/localhost

Trying to rename the MNLP179-alma Gateway to gw-MNLP179 but getting error:

[rcanillas@MNLP179-alma:~]$ geneos move gateway MNLP179-alma gw-MNLP179
Error: invalid arguments
[rcanillas@MNLP179-alma:~]$ geneos rename gateway MNLP179-alma gw-MNLP179
Error: invalid arguments

From the helptext, it should be possible to specify a type:

[rcanillas@MNLP179-alma:~]$ geneos move -h
Usage:
  geneos move [TYPE] SOURCE DESTINATION [KEY=VALUE...]

Aliases:
  move, mv, rename

Global Flags:
  -G, --config string   config file (defaults are $HOME/.config/geneos.json, /etc/geneos/geneos.json)
  -H, --host HOSTNAME   Limit actions to HOSTNAME (not for commands given instance@host parameters) (default "all")
@rcanillas-itrs rcanillas-itrs changed the title geneos move doe not work when specifying a type geneos move does not work when specifying a type Jan 17, 2024
@rcanillas-itrs
Copy link
Author

Found out how to print debug statements so here is a re-run:

Current netprobes:

[rcanillas@MNLP179-alma:~]$ geneos ls netprobe
Type      Name         Host       Flags  Port  Version                Home
netprobe  316495       localhost  A      7100  6.5.1+el8:6.5.1+el8    /home/rcanillas/geneos/netprobe/netprobes/316495
netprobe  np-MNLP179   localhost  A      7036  active_prod:6.6.0+el8  /home/rcanillas/geneos/netprobe/netprobes/np-MNLP179
netprobe  rename_test  localhost  A      7101  active_prod:6.6.0+el8  /home/rcanillas/geneos/netprobe/netprobes/rename_test

Want to rename rename_test to something else:

[rcanillas@MNLP179-alma:~]$ geneos move netprobe rename_test new_name
Error: invalid arguments

Debug:

[rcanillas@MNLP179-alma:~]$ geneos move netprobe rename_test new_name --debug
2024-01-17T11:35:31+08:00 DEBUG: tools/geneos/cmd/root.go:276 cmd.initConfig() > cordial: cordial 'geneos' running as 'geneos', version v1.11.2
2024-01-17T11:35:31+08:00 DEBUG: tools/geneos/cmd/parseargs.go:102 cmd.ParseArgs() > cordial: rawargs: [netprobe rename_test new_name]
2024-01-17T11:35:31+08:00 DEBUG: tools/geneos/cmd/parseargs.go:117 cmd.ParseArgs() > cordial: args [netprobe rename_test new_name], params [], ct
2024-01-17T11:35:31+08:00 DEBUG: tools/geneos/cmd/parseargs.go:148 cmd.ParseArgs() > cordial: matching [rename_test new_name]
2024-01-17T11:35:31+08:00 DEBUG: tools/geneos/cmd/parseargs.go:247 cmd.ParseArgs() > cordial: ct netprobe, args [rename_test], params []
2024-01-17T11:35:31+08:00 DEBUG: tools/geneos/internal/instance/instance.go:79 instance.ReservedName() > cordial: checking "rename_test"
Error: invalid arguments

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

No branches or pull requests

1 participant