Skip to content

Commit

Permalink
Merge pull request #233 from aerospike/v7.4.0
Browse files Browse the repository at this point in the history
V7.4.0
  • Loading branch information
robertglonek authored Jan 29, 2024
2 parents 09eee24 + 216d208 commit 04ba9a1
Show file tree
Hide file tree
Showing 2,172 changed files with 689,964 additions and 263 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
* FIX: The `net list` command does not work when client has same name as server.
* FIX: The `net loss-delay` feature would fail to activate a python environment.
* FIX: Docker: Regression - underscores in cluster names are allowed and should work.
* FIX: Docker: Issue with using new template naming conventions when old templates exist.
* FIX: AGI: AGI Commands would panic if cluster is not found.
* FIX: AGI: Default sftp threads to 1 and s3 threads to 4.
* FIX: AGI: Port 443 on AGI firewall in GCP should not lock to caller's IP by default.
* FIX: AGI: agi monitor would not work following adding of checks for sftp password.
* ENHANCEMENT: Owner tag, if not manually specified, will be filled with current OS username.
* ENHANCEMENT: Support all ubuntu 18+ and centos 7+ builds with `net loss-delay` feature.
* ENHANCEMENT: When `--on-destination` is selected in `net loss-delay`, set `--src-network` instead of `--network`.
* ENHANCEMENT: The `net loss-delay` feature now supports specifying ports.
Expand Down
3 changes: 3 additions & 0 deletions LATEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ _Release Date: January 2, 2024_
* FIX: The `net list` command does not work when client has same name as server.
* FIX: The `net loss-delay` feature would fail to activate a python environment.
* FIX: Docker: Regression - underscores in cluster names are allowed and should work.
* FIX: Docker: Issue with using new template naming conventions when old templates exist.
* FIX: AGI: AGI Commands would panic if cluster is not found.
* FIX: AGI: Default sftp threads to 1 and s3 threads to 4.
* FIX: AGI: Port 443 on AGI firewall in GCP should not lock to caller's IP by default.
* FIX: AGI: agi monitor would not work following adding of checks for sftp password.
* ENHANCEMENT: Owner tag, if not manually specified, will be filled with current OS username.
* ENHANCEMENT: Support all ubuntu 18+ and centos 7+ builds with `net loss-delay` feature.
* ENHANCEMENT: When `--on-destination` is selected in `net loss-delay`, set `--src-network` instead of `--network`.
* ENHANCEMENT: The `net loss-delay` feature now supports specifying ports.
Expand Down
7 changes: 7 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ help:
OUTPUTS: ../bin/ and ../bin/packages/\n\
"

.PHONY: webdebug
webdebug:
go generate
[ ! -f webui/www.tgz ] && touch webui/www.tgz || echo
go run . webui --web-path ../web/dev --web-no-override --listen 0.0.0.0:3333 --webroot /aerolab/ --debug-requests

.PHONY: macos-build-all
macos-build-all: macos-codesign macos-zip-build macos-pkg-build macos-pkg-sign

Expand Down Expand Up @@ -224,6 +230,7 @@ reset2:
prep:
go generate
cd ../expiries/aws && $(MAKE)
cd ../web && ./build.sh

.PHONY: compile_linux_wip_amd64
compile_linux_wip_amd64:
Expand Down
30 changes: 25 additions & 5 deletions src/backendDocker.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,9 @@ func (d *backendDocker) DeployCluster(v backendVersion, name string, nodeCount i
break
}
}
if !found && len(os.Args) > 0 && os.Args[1] == "webrun" {
return fmt.Errorf("network %s not found, choose another network or create one first with: aerolab config docker", extra.network)
}
if !found {
fmt.Printf("Network %s not found! Create (y/n)? ", extra.network)
reader := bufio.NewReader(os.Stdin)
Expand Down Expand Up @@ -799,6 +802,28 @@ func (d *backendDocker) DeployCluster(v backendVersion, name string, nodeCount i
}
}
exposeFreeListNext := -1
arch := "amd64"
if v.isArm {
arch = "arm64"
}
tmplName := fmt.Sprintf(dockerNameHeader+"%s_%s_%s:%s", v.distroName, v.distroVersion, arch, v.aerospikeVersion)
// NOTE: eventually remve this code block up to the for loop - it is used in transition between old and new image naming formats
repoCheck, err := exec.Command("docker", "image", "list", "--format", "{{json .Repository}}").CombinedOutput()
if err != nil {
return err
}
newTmpl := false
ss := bufio.NewScanner(bytes.NewReader(repoCheck))
for ss.Scan() {
if strings.Trim(ss.Text(), "\r\n\t \"") == tmplName {
newTmpl = true
break
}
}
if !newTmpl {
tmplName = fmt.Sprintf(dockerNameHeader+"%s_%s:%s", v.distroName, v.distroVersion, v.aerospikeVersion)
}
//END remove NOTE
for node := highestNode; node < nodeCount+highestNode; node = node + 1 {
exposeFreeListNext++
var out []byte
Expand All @@ -809,11 +834,6 @@ func (d *backendDocker) DeployCluster(v backendVersion, name string, nodeCount i
for _, newlabel := range extra.labels {
exposeList = append(exposeList, "--label", newlabel)
}
arch := "amd64"
if v.isArm {
arch = "arm64"
}
tmplName := fmt.Sprintf(dockerNameHeader+"%s_%s_%s:%s", v.distroName, v.distroVersion, arch, v.aerospikeVersion)
if d.client {
tmplName = d.imageNaming(v)
}
Expand Down
48 changes: 25 additions & 23 deletions src/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,31 @@ import (
)

type commands struct {
Config configCmd `command:"config" subcommands-optional:"true" description:"Show or change aerolab configuration"`
Cluster clusterCmd `command:"cluster" subcommands-optional:"true" description:"Create and manage Aerospike clusters and nodes"`
Aerospike aerospikeCmd `command:"aerospike" subcommands-optional:"true" description:"Aerospike daemon controls"`
Client clientCmd `command:"client" subcommands-optional:"true" description:"Create and manage Client machine groups"`
Inventory inventoryCmd `command:"inventory" subcommands-optional:"true" description:"List or operate on all clusters, clients and templates"`
Attach attachCmd `command:"attach" subcommands-optional:"true" description:"Attach to a node and run a command"`
Net netCmd `command:"net" subcommands-optional:"true" description:"Firewall and latency simulation"`
Conf confCmd `command:"conf" subcommands-optional:"true" description:"Manage Aerospike configuration on running nodes"`
Tls tlsCmd `command:"tls" subcommands-optional:"true" description:"Create or copy TLS certificates"`
Data dataCmd `command:"data" subcommands-optional:"true" description:"Insert/delete Aerospike data"`
Template templateCmd `command:"template" subcommands-optional:"true" description:"Manage or delete template images"`
Installer installerCmd `command:"installer" subcommands-optional:"true" description:"List or download Aerospike installer versions"`
Logs logsCmd `command:"logs" subcommands-optional:"true" description:"show or download logs"`
Files filesCmd `command:"files" subcommands-optional:"true" description:"Upload/Download files to/from clients or clusters"`
XDR xdrCmd `command:"xdr" subcommands-optional:"true" description:"Mange clusters' xdr configuration"`
Roster rosterCmd `command:"roster" subcommands-optional:"true" description:"Show or apply strong-consistency rosters"`
Version versionCmd `command:"version" subcommands-optional:"true" description:"Print AeroLab version"`
Completion completionCmd `command:"completion" subcommands-optional:"true" description:"Install shell completion scripts"`
Rest restCmd `command:"rest-api" subcommands-optional:"true" description:"Launch HTTP rest API"`
AGI agiCmd `command:"agi" subcommands-optional:"true" description:"Launch or manage AGI troubleshooting instances"`
Volume volumeCmd `command:"volume" subcommands-optional:"true" description:"Volume management (AWS EFS only)"`
ShowCommands showcommandsCmd `command:"showcommands" subcommands-optional:"true" description:"Install showsysinfo,showconf,showinterrupts on the current system"`
Upgrade upgradeCmd `command:"upgrade" subcommands-optional:"true" description:"Upgrade AeroLab binary"`
Config configCmd `command:"config" subcommands-optional:"true" description:"Show or change aerolab configuration" webicon:"fas fa-toolbox"`
Cluster clusterCmd `command:"cluster" subcommands-optional:"true" description:"Create and manage Aerospike clusters and nodes" webicon:"fas fa-database"`
Aerospike aerospikeCmd `command:"aerospike" subcommands-optional:"true" description:"Aerospike daemon controls" webicon:"fas fa-a"`
Client clientCmd `command:"client" subcommands-optional:"true" description:"Create and manage Client machine groups" webicon:"fas fa-tv"`
Inventory inventoryCmd `command:"inventory" subcommands-optional:"true" description:"List or operate on all clusters, clients and templates" webicon:"fas fa-warehouse"`
Attach attachCmd `command:"attach" subcommands-optional:"true" description:"Attach to a node and run a command" webicon:"fas fa-plug"`
Net netCmd `command:"net" subcommands-optional:"true" description:"Firewall and latency simulation" webicon:"fas fa-network-wired"`
Conf confCmd `command:"conf" subcommands-optional:"true" description:"Manage Aerospike configuration on running nodes" webicon:"fas fa-wrench"`
Tls tlsCmd `command:"tls" subcommands-optional:"true" description:"Create or copy TLS certificates" webicon:"fas fa-lock"`
Data dataCmd `command:"data" subcommands-optional:"true" description:"Insert/delete Aerospike data" webicon:"fas fa-folder-open"`
Template templateCmd `command:"template" subcommands-optional:"true" description:"Manage or delete template images" webicon:"fas fa-file-image"`
Installer installerCmd `command:"installer" subcommands-optional:"true" description:"List or download Aerospike installer versions" webicon:"fas fa-plus"`
Logs logsCmd `command:"logs" subcommands-optional:"true" description:"show or download logs" webicon:"fas fa-bars-progress"`
Files filesCmd `command:"files" subcommands-optional:"true" description:"Upload/Download files to/from clients or clusters" webicon:"fas fa-file"`
XDR xdrCmd `command:"xdr" subcommands-optional:"true" description:"Mange clusters' xdr configuration" webicon:"fas fa-object-group"`
Roster rosterCmd `command:"roster" subcommands-optional:"true" description:"Show or apply strong-consistency rosters" webicon:"fas fa-sliders"`
Completion completionCmd `command:"completion" subcommands-optional:"true" description:"Install shell completion scripts" webicon:"fas fa-arrows-turn-to-dots"`
AGI agiCmd `command:"agi" subcommands-optional:"true" description:"Launch or manage AGI troubleshooting instances" webicon:"fas fa-chart-line"`
Volume volumeCmd `command:"volume" subcommands-optional:"true" description:"Volume management (AWS EFS/GCP Volume only)" webicon:"fas fa-hard-drive"`
ShowCommands showcommandsCmd `command:"showcommands" subcommands-optional:"true" description:"Install showsysinfo,showconf,showinterrupts on the current system" webicon:"fas fa-terminal"`
Rest restCmd `command:"rest-api" subcommands-optional:"true" description:"Launch HTTP rest API" webicon:"fas fa-globe" webhidden:"true"`
Web webCmd `command:"webui" subcommands-optional:"true" description:"Launch AeroLab Web UI" webicon:"fas fa-globe" webhidden:"true"`
Version versionCmd `command:"version" subcommands-optional:"true" description:"Print AeroLab version" webicon:"fas fa-code-branch"`
Upgrade upgradeCmd `command:"upgrade" subcommands-optional:"true" description:"Upgrade AeroLab binary" webicon:"fas fa-circle-up"`
WebRun webRunCmd `command:"webrun" subcommands-optional:"true" description:"Upgrade AeroLab binary" hidden:"true"`
commandsDefaults
}

Expand Down
10 changes: 5 additions & 5 deletions src/cmdAerospike.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package main
import "os"

type aerospikeCmd struct {
Start aerospikeStartCmd `command:"start" subcommands-optional:"true" description:"Start aerospike"`
Stop aerospikeStopCmd `command:"stop" subcommands-optional:"true" description:"Stop aerospike"`
Restart aerospikeRestartCmd `command:"restart" subcommands-optional:"true" description:"Restart aerospike"`
Status aerospikeStatusCmd `command:"status" subcommands-optional:"true" description:"Aerospike daemon status"`
Upgrade aerospikeUpgradeCmd `command:"upgrade" subcommands-optional:"true" description:"Upgrade aerospike daemon"`
Start aerospikeStartCmd `command:"start" subcommands-optional:"true" description:"Start aerospike" webicon:"fas fa-play"`
Stop aerospikeStopCmd `command:"stop" subcommands-optional:"true" description:"Stop aerospike" webicon:"fas fa-stop"`
Restart aerospikeRestartCmd `command:"restart" subcommands-optional:"true" description:"Restart aerospike" webicon:"fas fa-forward-step"`
Status aerospikeStatusCmd `command:"status" subcommands-optional:"true" description:"Aerospike daemon status" webicon:"fas fa-circle-question"`
Upgrade aerospikeUpgradeCmd `command:"upgrade" subcommands-optional:"true" description:"Upgrade aerospike daemon" webicon:"fas fa-circle-arrow-up"`
Help helpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

Expand Down
6 changes: 3 additions & 3 deletions src/cmdAerospikeUpgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import (
type aerospikeUpgradeCmd struct {
aerospikeStartSelectorCmd
aerospikeVersionSelectorCmd
Aws aerospikeUpgradeCmdAws `no-flag:"true"`
Gcp aerospikeUpgradeCmdAws `no-flag:"true"`
RestartAerospike TypeYesNo `short:"s" long:"restart" description:"Restart aerospike after upgrade (y/n)" default:"y"`
RestartAerospike TypeYesNo `short:"s" long:"restart" description:"Restart aerospike after upgrade (y/n)" default:"y" webchoice:"y,n"`
parallelThreadsCmd
Aws aerospikeUpgradeCmdAws `no-flag:"true"`
Gcp aerospikeUpgradeCmdAws `no-flag:"true"`
}

type aerospikeUpgradeCmdAws struct {
Expand Down
32 changes: 16 additions & 16 deletions src/cmdAgi.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ func init() {
}

type agiCmd struct {
List agiListCmd `command:"list" subcommands-optional:"true" description:"List AGI instances"`
Create agiCreateCmd `command:"create" subcommands-optional:"true" description:"Create AGI instance"`
Start agiStartCmd `command:"start" subcommands-optional:"true" description:"Start AGI instance"`
Stop agiStopCmd `command:"stop" subcommands-optional:"true" description:"Stop AGI instance"`
Status agiStatusCmd `command:"status" subcommands-optional:"true" description:"Show status of an AGI instance"`
Details agiDetailsCmd `command:"details" subcommands-optional:"true" description:"Show details of an AGI instance"`
Destroy agiDestroyCmd `command:"destroy" subcommands-optional:"true" description:"Destroy AGI instance"`
Delete agiDeleteCmd `command:"delete" subcommands-optional:"true" description:"Destroy AGI instance and Delete AGI EFS volume of the same name"`
Relabel agiRelabelCmd `command:"change-label" subcommands-optional:"true" description:"Change instance name label"`
Retrigger agiRetriggerCmd `command:"run-ingest" subcommands-optional:"true" description:"Retrigger log ingest again (will only do bits that have not been done before)"`
Attach agiAttachCmd `command:"attach" subcommands-optional:"true" description:"Attach to an AGI Instance"`
AddToken agiAddTokenCmd `command:"add-auth-token" subcommands-optional:"true" description:"Add an auth token to AGI Proxy - only valid if token auth type was selected"`
Share clusterShareCmd `command:"share" subcommands-optional:"true" description:"AWS/GCP: share the AGI node by importing a provided ssh public key file"`
List agiListCmd `command:"list" subcommands-optional:"true" description:"List AGI instances" webicon:"fas fa-list"`
Create agiCreateCmd `command:"create" subcommands-optional:"true" description:"Create AGI instance" webicon:"fas fa-circle-plus"`
Start agiStartCmd `command:"start" subcommands-optional:"true" description:"Start AGI instance" webicon:"fas fa-play"`
Stop agiStopCmd `command:"stop" subcommands-optional:"true" description:"Stop AGI instance" webicon:"fas fa-stop"`
Status agiStatusCmd `command:"status" subcommands-optional:"true" description:"Show status of an AGI instance" webicon:"fas fa-circle-question"`
Details agiDetailsCmd `command:"details" subcommands-optional:"true" description:"Show details of an AGI instance" webicon:"fas fa-circle-info"`
Destroy agiDestroyCmd `command:"destroy" subcommands-optional:"true" description:"Destroy AGI instance" webicon:"fas fa-trash"`
Delete agiDeleteCmd `command:"delete" subcommands-optional:"true" description:"Destroy AGI instance and Delete AGI EFS volume of the same name" webicon:"fas fa-dumpster"`
Relabel agiRelabelCmd `command:"change-label" subcommands-optional:"true" description:"Change instance name label" webicon:"fas fa-tag"`
Retrigger agiRetriggerCmd `command:"run-ingest" subcommands-optional:"true" description:"Retrigger log ingest again (will only do bits that have not been done before)" webicon:"fas fa-water"`
Attach agiAttachCmd `command:"attach" subcommands-optional:"true" description:"Attach to an AGI Instance" webicon:"fas fa-terminal"`
AddToken agiAddTokenCmd `command:"add-auth-token" subcommands-optional:"true" description:"Add an auth token to AGI Proxy - only valid if token auth type was selected" webicon:"fas fa-key"`
Share clusterShareCmd `command:"share" subcommands-optional:"true" description:"AWS/GCP: share the AGI node by importing a provided ssh public key file" webicon:"fas fa-share"`
Exec agiExecCmd `command:"exec" hidden:"true" subcommands-optional:"true" description:"Run an AGI subsystem"`
Monitor agiMonitorCmd `command:"monitor" subcommands-optional:"true" description:"AGI auto-sizing and spot->on-demand upgrading system monitor"`
Monitor agiMonitorCmd `command:"monitor" subcommands-optional:"true" description:"AGI auto-sizing and spot->on-demand upgrading system monitor" webicon:"fas fa-equals"`
Help helpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

Expand Down Expand Up @@ -271,7 +271,7 @@ func (c *agiRelabelCmd) Execute(args []string) error {
type agiAttachCmd struct {
ClusterName TypeClusterName `short:"n" long:"name" description:"AGI name" default:"agi"`
Detach bool `long:"detach" description:"detach the process stdin - will not kill process on CTRL+C"`
Tail []string `description:"List containing command parameters to execute, ex: [\"ls\",\"/opt\"]"`
Tail []string `description:"List containing command parameters to execute, ex: [\"ls\",\"/opt\"]" webrequired:"true"`
Help attachCmdHelp `command:"help" subcommands-optional:"true" description:"Print help"`
}

Expand Down Expand Up @@ -310,7 +310,7 @@ type agiRetriggerCmd struct {
PatternsFile *flags.Filename `long:"ingest-patterns-file" description:"provide a custom patterns YAML file to the log ingest system"`
IngestLogLevel *int `long:"ingest-log-level" description:"1-CRITICAL,2-ERROR,3-WARN,4-INFO,5-DEBUG,6-DETAIL"`
IngestCpuProfile *bool `long:"ingest-cpu-profiling" description:"enable log ingest cpu profiling"`
Force bool `long:"force" description:"do not ask for confirmation, just continue"`
Force bool `long:"force" description:"do not ask for confirmation, just continue" webdisable:"true" webset:"true"`
Help helpCmd `command:"help" subcommands-optional:"true" description:"Print help"`
}

Expand Down
Loading

0 comments on commit 04ba9a1

Please sign in to comment.