mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-13 02:01:10 +08:00
Compare commits
9 Commits
PMM-12548-
...
pmm-3.5.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14ca3d0205 | ||
|
|
84095fd7d7 | ||
|
|
47b8c5b067 | ||
|
|
7717cfe4f1 | ||
|
|
f9d9a993e9 | ||
|
|
7f322f7cbd | ||
|
|
3ff98c20bc | ||
|
|
f816053065 | ||
|
|
34a14ec77e |
@@ -1,5 +1,11 @@
|
|||||||
Changelog for Percona Toolkit
|
Changelog for Percona Toolkit
|
||||||
|
|
||||||
|
v3.7.0-1 released 2025-05-14
|
||||||
|
|
||||||
|
This release addresses multiple security vulnerabilities reported in Percona Toolkit version 3.7.0, including issues related to the `libxml2` component (CVE-2024-56171, CVE-2025-24928), `openssl` (CVE-2024-12797), and `krb5` (CVE-2022-37967).
|
||||||
|
|
||||||
|
* Fixed bug PT-2442: percona-toolkit:latest Vulnerability [CVE-2024-56171 CVE-2024-12797 CVE-2022-37967 CVE-2025-24928]
|
||||||
|
|
||||||
v3.7.0 released 2024-12-23
|
v3.7.0 released 2024-12-23
|
||||||
|
|
||||||
* Feature PT-2340: Support MySQL 8.4
|
* Feature PT-2340: Support MySQL 8.4
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ MAKE_GOTOOLS
|
|||||||
|
|
||||||
WriteMakefile(
|
WriteMakefile(
|
||||||
NAME => 'Percona::Toolkit',
|
NAME => 'Percona::Toolkit',
|
||||||
VERSION => '3.7.0',
|
VERSION => '3.7.0-1',
|
||||||
EXE_FILES => [
|
EXE_FILES => [
|
||||||
map {
|
map {
|
||||||
(my $name = $_) =~ s/^bin.//;
|
(my $name = $_) =~ s/^bin.//;
|
||||||
|
|||||||
@@ -582,8 +582,8 @@ OS_NAME=
|
|||||||
ARCH=
|
ARCH=
|
||||||
OS=
|
OS=
|
||||||
INSTALL=0
|
INSTALL=0
|
||||||
RPM_RELEASE=1
|
RPM_RELEASE=2
|
||||||
DEB_RELEASE=1
|
DEB_RELEASE=2
|
||||||
REVISION=0
|
REVISION=0
|
||||||
GIT_BRANCH=${GIT_BRANCH}
|
GIT_BRANCH=${GIT_BRANCH}
|
||||||
GIT_REPO=https://github.com/percona/percona-toolkit.git
|
GIT_REPO=https://github.com/percona/percona-toolkit.git
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ copyright = u'2024, Percona LLC and/or its affiliates'
|
|||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '3.7'
|
version = '3.7'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '3.7.0'
|
release = '3.7.0-1'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|||||||
@@ -1,6 +1,16 @@
|
|||||||
Release Notes
|
Release Notes
|
||||||
***************
|
***************
|
||||||
|
|
||||||
|
v3.7.0-1 released 2025-05-14
|
||||||
|
==============================
|
||||||
|
|
||||||
|
This release addresses multiple security vulnerabilities reported in Percona Toolkit version 3.7.0, including issues related to the `libxml2` component (CVE-2024-56171, CVE-2025-24928), `openssl` (CVE-2024-12797), and `krb5` (CVE-2022-37967).
|
||||||
|
|
||||||
|
Bug Fixed
|
||||||
|
------------
|
||||||
|
|
||||||
|
* :jirabug:`PT-2442`: percona-toolkit:latest Vulnerability [CVE-2024-56171 CVE-2024-12797 CVE-2022-37967 CVE-2025-24928]
|
||||||
|
|
||||||
v3.7.0 released 2024-12-23
|
v3.7.0 released 2024-12-23
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
planSummaryCollScan = "COLLSCAN"
|
planSummaryCollScan = "COLLSCAN"
|
||||||
planSummaryIXScan = "IXSCAN"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type StatsError struct {
|
type StatsError struct {
|
||||||
@@ -106,9 +105,8 @@ func (s *Stats) Add(doc proto.SystemProfile) error {
|
|||||||
if qiac.PlanSummary == planSummaryCollScan {
|
if qiac.PlanSummary == planSummaryCollScan {
|
||||||
qiac.CollScanCount++
|
qiac.CollScanCount++
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(qiac.PlanSummary, planSummaryIXScan) {
|
|
||||||
qiac.PlanSummary = planSummaryIXScan
|
qiac.PlanSummary = strings.Split(qiac.PlanSummary, " ")[0]
|
||||||
}
|
|
||||||
|
|
||||||
qiac.NReturned = append(qiac.NReturned, float64(doc.Nreturned))
|
qiac.NReturned = append(qiac.NReturned, float64(doc.Nreturned))
|
||||||
qiac.QueryTime = append(qiac.QueryTime, float64(doc.Millis))
|
qiac.QueryTime = append(qiac.QueryTime, float64(doc.Millis))
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Infof("cannot check version updates: %s", err.Error())
|
log.Infof("cannot check version updates: %s", err.Error())
|
||||||
} else if advice != "" {
|
} else if advice != "" {
|
||||||
log.Infof(advice)
|
log.Infof("%s", advice)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,24 +373,6 @@ func getHostInfo(ctx context.Context, client *mongo.Client) (*hostInfo, error) {
|
|||||||
return nil, errors.Wrap(err, "GetHostInfo.hostInfo")
|
return nil, errors.Wrap(err, "GetHostInfo.hostInfo")
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdOpts := proto.CommandLineOptions{}
|
|
||||||
query := primitive.D{{Key: "getCmdLineOpts", Value: 1}}
|
|
||||||
err := client.Database("admin").RunCommand(ctx, query).Decode(&cmdOpts)
|
|
||||||
if err != nil {
|
|
||||||
return nil, errors.Wrap(err, "cannot get command line options")
|
|
||||||
}
|
|
||||||
|
|
||||||
ss := proto.ServerStatus{}
|
|
||||||
query = primitive.D{{Key: "serverStatus", Value: 1}}
|
|
||||||
if err := client.Database("admin").RunCommand(ctx, query).Decode(&ss); err != nil {
|
|
||||||
return nil, errors.Wrap(err, "GetHostInfo.serverStatus")
|
|
||||||
}
|
|
||||||
|
|
||||||
pi := procInfo{}
|
|
||||||
if err := getProcInfo(int32(ss.Pid), &pi); err != nil {
|
|
||||||
pi.Error = err
|
|
||||||
}
|
|
||||||
|
|
||||||
nodeType, _ := getNodeType(ctx, client)
|
nodeType, _ := getNodeType(ctx, client)
|
||||||
procCount, _ := countMongodProcesses()
|
procCount, _ := countMongodProcesses()
|
||||||
|
|
||||||
@@ -398,24 +380,41 @@ func getHostInfo(ctx context.Context, client *mongo.Client) (*hostInfo, error) {
|
|||||||
Hostname: hi.System.Hostname,
|
Hostname: hi.System.Hostname,
|
||||||
HostOsType: hi.Os.Type,
|
HostOsType: hi.Os.Type,
|
||||||
HostSystemCPUArch: hi.System.CpuArch,
|
HostSystemCPUArch: hi.System.CpuArch,
|
||||||
DBPath: "", // Sets default. It will be overridden later if necessary
|
ProcProcessCount: procCount,
|
||||||
|
NodeType: nodeType,
|
||||||
ProcessName: ss.Process,
|
CmdlineArgs: nil,
|
||||||
ProcProcessCount: procCount,
|
|
||||||
Version: ss.Version,
|
|
||||||
NodeType: nodeType,
|
|
||||||
|
|
||||||
ProcPath: pi.Path,
|
|
||||||
ProcUserName: pi.UserName,
|
|
||||||
ProcCreateTime: pi.CreateTime,
|
|
||||||
CmdlineArgs: cmdOpts.Argv,
|
|
||||||
}
|
|
||||||
if ss.Repl != nil {
|
|
||||||
i.ReplicasetName = ss.Repl.SetName
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if cmdOpts.Parsed.Storage.DbPath != "" {
|
var cmdOpts proto.CommandLineOptions
|
||||||
i.DBPath = cmdOpts.Parsed.Storage.DbPath
|
query := primitive.D{{Key: "getCmdLineOpts", Value: 1}}
|
||||||
|
err := client.Database("admin").RunCommand(ctx, query).Decode(&cmdOpts)
|
||||||
|
if err == nil {
|
||||||
|
if len(cmdOpts.Argv) > 0 {
|
||||||
|
i.CmdlineArgs = cmdOpts.Argv
|
||||||
|
}
|
||||||
|
if cmdOpts.Parsed.Storage.DbPath != "" {
|
||||||
|
i.DBPath = cmdOpts.Parsed.Storage.DbPath
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var ss proto.ServerStatus
|
||||||
|
query = primitive.D{{Key: "serverStatus", Value: 1}}
|
||||||
|
err = client.Database("admin").RunCommand(ctx, query).Decode(&ss)
|
||||||
|
if err == nil {
|
||||||
|
i.ProcessName = ss.Process
|
||||||
|
i.Version = ss.Version
|
||||||
|
if ss.Repl != nil {
|
||||||
|
i.ReplicasetName = ss.Repl.SetName
|
||||||
|
}
|
||||||
|
|
||||||
|
pi := procInfo{}
|
||||||
|
if err := getProcInfo(int32(ss.Pid), &pi); err != nil {
|
||||||
|
pi.Error = err
|
||||||
|
} else {
|
||||||
|
i.ProcPath = pi.Path
|
||||||
|
i.ProcUserName = pi.UserName
|
||||||
|
i.ProcCreateTime = pi.CreateTime
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return i, nil
|
return i, nil
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pborman/getopt"
|
"github.com/pborman/getopt"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
tu "github.com/percona/percona-toolkit/src/go/internal/testutils"
|
tu "github.com/percona/percona-toolkit/src/go/internal/testutils"
|
||||||
"github.com/percona/percona-toolkit/src/go/mongolib/proto"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetHostInfo(t *testing.T) {
|
func TestGetHostInfo(t *testing.T) {
|
||||||
@@ -49,6 +49,18 @@ func TestGetHostInfo(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestGetHostInfoResult(t *testing.T) {
|
||||||
|
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
|
client, err := tu.TestClient(ctx, tu.MongoDBShard1PrimaryPort)
|
||||||
|
require.NoError(t, err, "cannot get a new MongoDB client")
|
||||||
|
|
||||||
|
host, err := getHostInfo(ctx, client)
|
||||||
|
require.NoError(t, err, "getHostInfo error")
|
||||||
|
require.NotEmpty(t, host)
|
||||||
|
}
|
||||||
|
|
||||||
func TestClusterWideInfo(t *testing.T) {
|
func TestClusterWideInfo(t *testing.T) {
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
name string
|
name string
|
||||||
@@ -85,16 +97,6 @@ func TestClusterWideInfo(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func addToCounters(ss proto.ServerStatus, increment int64) proto.ServerStatus {
|
|
||||||
ss.Opcounters.Command += increment
|
|
||||||
ss.Opcounters.Delete += increment
|
|
||||||
ss.Opcounters.GetMore += increment
|
|
||||||
ss.Opcounters.Insert += increment
|
|
||||||
ss.Opcounters.Query += increment
|
|
||||||
ss.Opcounters.Update += increment
|
|
||||||
return ss
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestParseArgs(t *testing.T) {
|
func TestParseArgs(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
args []string
|
args []string
|
||||||
|
|||||||
Reference in New Issue
Block a user