Skip to content

Commit a22a02f

Browse files
authored
Merge branch 'yugabyte:master' into master
2 parents 8761284 + a55bf6d commit a22a02f

File tree

1,045 files changed

+38482
-22829
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,045 files changed

+38482
-22829
lines changed

.arclint

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
"(^managed/src/main/resources/v1[.]routes$)",
1313
"(^managed/src/main/public/swagger-ui/)",
1414
"(^managed/src/main/resources/swagger[.]json$)",
15+
"(^managed/src/main/resources/swagger-strict[.]json$)",
1516
"(^managed/build[.]sbt$)",
1617
"(^managed/src/main/resources/aws_pricing/.*$)",
1718
"(^python/yb/test_data/.*[.](log|out)$)",
1819
"(^managed/src/main/resources/metric/Dashboard[.]json$)",
1920
"(^managed/src/main/resources/metric/recording_rules[.]yml$)",
2021
"(^managed/devops/replicated[.]yml$)",
21-
"(^python/yb/py[.]typed$)"
22+
"(^python/yb/py[.]typed$)",
23+
"(^managed/RUNTIME-FLAGS[.]md$)"
2224
],
2325
"linters": {
2426
"go-files": {

.github/ISSUE_TEMPLATE/cdc.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: YSQL-CDC
2+
description: Create a CDC issue.
3+
title: "[CDCSDK] Title"
4+
labels: ["area/cdcsdk", "status/awaiting-triage"]
5+
body:
6+
- type: textarea
7+
id: cdcsdk
8+
attributes:
9+
label: Description
10+
placeholder: |
11+
**Provide a detailed description of the issue you want to report related to YSQL.**
12+
13+
**Include steps to reproduce the issue.**
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: connectorversion
18+
attributes:
19+
label: Source connector version
20+
placeholder: |
21+
**v1.9.5.y.15**
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: configuration
26+
attributes:
27+
label: Connector configuration
28+
placeholder: |
29+
**Configuration properties used to deploy the YugabyteDB Source Connector**
30+
validations:
31+
required: true
32+
- type: textarea
33+
id: ybversion
34+
attributes:
35+
label: YugabyteDB version
36+
placeholder: |
37+
**The YugabyteDB version with build number (if available)**
38+
validations:
39+
required: false

.github/ISSUE_TEMPLATE/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Docs
22
description: Create a documentation issue.
33
title: "[Docs] Title"
4-
labels: ["area/documentation"]
4+
labels: ["area/documentation", "status/awaiting-triage"]
55
body:
66
- type: textarea
77
id: documentation
@@ -10,4 +10,4 @@ body:
1010
placeholder: |
1111
**Provide a detailed description of the information you want to update/include in the YugabyteDB docs.**
1212
validations:
13-
required: true
13+
required: true

.github/ISSUE_TEMPLATE/ui.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ body:
99
label: Description
1010
placeholder: |
1111
**Provide a clear description of the issue you want to report related to the UI in Yugabyte.**
12-
13-
**NOTE: If you can, please specify the product in question. For example, if this is a platform issue, include it in your issue like so: [UI] [Platform] Title**
12+
13+
**NOTE: If you can, please specify the product in question. For example, if this is a YugabyteDB Anywhere issue, include it in your issue like so: [UI] [YBA] Title**
1414
validations:
15-
required: true
15+
required: true

.github/ISSUE_TEMPLATE/yugabyted.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: yugabyted
2+
description: Create a yugabyted issue.
3+
title: "[yugabyted] Title"
4+
labels: ["area/ecosystem", "area/ybd", "status/awaiting-triage"]
5+
body:
6+
- type: textarea
7+
id: yugabyted
8+
attributes:
9+
label: Description
10+
placeholder: |
11+
**Provide a detailed description of the issue you want to report with the yugabyted based deployments.**
12+
13+
**Include the steps to reproduce the issue.**
14+
validations:
15+
required: true

bin/openssl_proxy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22

33
root_certs_generation=false
44
node_certs_generation=false
@@ -12,7 +12,7 @@ hostname=""
1212

1313
show_help() {
1414
cat >&1 <<-EOT
15-
gen_certs.sh is to be used to create SSL certificates for secure deployment of YugabyteDB.
15+
openssl_proxy.sh is to be used to create SSL certificates for secure deployment of YugabyteDB.
1616
---------------------------------------------------------------------------------------------------
1717
Usage: ${0##*/} [<action>] [<flags>]
1818

bin/yugabyted

Lines changed: 53 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -394,14 +394,30 @@ class ControlScript(object):
394394

395395
self.start_processes()
396396

397+
# Kills all processes related to yugabyted
398+
def kill_all_procs(self):
399+
pid = self.script.get_pid()
400+
if pid:
401+
pgid = os.getpgid(pid)
402+
if not pgid:
403+
Output.log("PGID could not be found for {} process".format(SCRIPT_NAME) +
404+
"with PID {}. Is {} running?".format(pid, SCRIPT_NAME))
405+
return ("No PGID", pid)
406+
else:
407+
try:
408+
os.killpg(pgid, SIGTERM)
409+
except OSError as err:
410+
return (err, pid)
411+
self.script.delete_pidfile()
412+
return (None, pid)
413+
397414
# Kills currently running yugabyted process if it exists.
398415
def stop(self, *args):
399-
(err, pid) = self.script.kill()
416+
(err, pid) = self.kill_all_procs()
400417
if err:
401-
Output.print_out(
418+
Output.log_error_and_exit(
402419
"Failed to shut down {}: {}. Please check PID in {}".format(
403420
SCRIPT_NAME, err, self.script.pidfile))
404-
sys.exit(1)
405421
elif pid:
406422
self.script.wait_until_stop(pid)
407423
Output.print_out("Stopped {} using config {}.".format(SCRIPT_NAME, self.conf_file))
@@ -416,7 +432,7 @@ class ControlScript(object):
416432

417433
# Destroy the YugabyteDB cluster.
418434
def destroy(self):
419-
(err, pid) = self.script.kill()
435+
(err, pid) = self.kill_all_procs()
420436
if err:
421437
Output.log_error_and_exit(
422438
"Failed to shut down {}: {}. Please check PID in {}".format(
@@ -1360,6 +1376,9 @@ class ControlScript(object):
13601376
if self.configs.saved_data.get("use_cassandra_authentication"):
13611377
yb_tserver_cmd.extend(["--use_cassandra_authentication=true"])
13621378

1379+
if self.configs.saved_data.get("dns_enabled"):
1380+
yb_tserver_cmd.extend(["--use_node_hostname_for_local_tserver=true"])
1381+
13631382
self.processes = {
13641383
"master": YBProcessManager(
13651384
"master", yb_master_cmd, self.configs.saved_data.get("log_dir"),
@@ -1369,15 +1388,6 @@ class ControlScript(object):
13691388
self.configs.saved_data.get("data_dir")),
13701389
}
13711390

1372-
# if self.configs.temp_data.get("ui"):
1373-
# yugabyted_ui_cmd = [ find_binary_location("yugabyted-ui")] + \
1374-
# [
1375-
# "-database_host={}".format(bind_ip)
1376-
# ]
1377-
# self.processes["yugabyted-ui"] = ProcessManager(
1378-
# "yugabyted-ui", yugabyted_ui_cmd, self.configs.saved_data.get("log_dir"),
1379-
# self.configs.saved_data.get("data_dir"))
1380-
13811391
for p in self.processes.values():
13821392
pid = p.get_pid()
13831393
if pid:
@@ -2025,7 +2035,7 @@ class ControlScript(object):
20252035

20262036
placementInfoOfEveryNode = {}
20272037
for node in dictOfAllNodes:
2028-
hostname = re.split('[-:]', node)[0]
2038+
hostname = node.split(":")[0]
20292039
cloudLocationOfHost = "{}.{}.{}".format(dictOfAllNodes[node]["cloud"],
20302040
dictOfAllNodes[node]["region"], dictOfAllNodes[node]["zone"])
20312041
placementInfoOfEveryNode[hostname] = cloudLocationOfHost
@@ -2636,13 +2646,22 @@ class ControlScript(object):
26362646
# Regex expression for validating IPv6
26372647
ipv6_regex = "((([0-9a-fA-F]){1,4})\\:){7}([0-9a-fA-F]){1,4}"
26382648

2649+
# Regex expression for validating DNS names
2650+
dns_regex = "^((?!-)[A-Za-z0-9-]" + "{1,63}(?<!-)\\.)" +"+[A-Za-z]{2,6}"
2651+
26392652
ipv4_pattern = re.compile(ipv4_regex)
26402653
ipv6_pattern = re.compile(ipv6_regex)
2654+
dns_pattern = re.compile(dns_regex)
26412655

26422656
# Checking if it is not a valid IPv4 or IPv6 addresses
2643-
if not (re.search(ipv4_pattern, ip) or re.search(ipv6_pattern, ip)):
2657+
if not (re.search(ipv4_pattern, ip) or
2658+
re.search(ipv6_pattern, ip) or
2659+
re.search(dns_pattern, ip)):
26442660
return False
26452661

2662+
if re.search(dns_pattern, ip):
2663+
self.configs.saved_data["dns_enabled"] = True
2664+
26462665
return True
26472666

26482667
# Returns a list of invalid IPs from the list of IPs provided.
@@ -3135,8 +3154,12 @@ class ControlScript(object):
31353154
self.configs.saved_data["ca_cert_file_path"] = os.path.join(args.certs_dir,
31363155
"ca.crt")
31373156

3138-
args.ui = self.parse_bool(args.ui)
31393157
args.background = self.parse_bool(args.background)
3158+
if args.ui is not None:
3159+
args.ui = self.parse_bool(args.ui)
3160+
else:
3161+
args.ui = self.configs.saved_data.get("ui")
3162+
31403163
if args.callhome is not None:
31413164
args.callhome = self.parse_bool(args.callhome)
31423165
elif os.environ.get("YB_DISABLE_CALLHOME") is not None:
@@ -3162,15 +3185,6 @@ class ControlScript(object):
31623185
self.setup_env_init.is_exists('YCQL_PASSWORD'):
31633186
args.use_cassandra_authentication = True
31643187

3165-
# Output.log("Downloading the Yugabyted UI Binaries.")
3166-
# if args.ui and not self.download_extract_yugabyted_ui_binary():
3167-
# Output.print_out('WARNING: UI disabled - Unable to download ui binaries.')
3168-
# args.ui = False
3169-
3170-
# if args.ui and not self.java_installed():
3171-
# Output.print_out('WARNING: UI disabled - Java 1.8 or higher is required.')
3172-
# args.ui = False
3173-
31743188
self.configs.temp_data["background"] = args.background
31753189
self.configs.saved_data["ui"] = args.ui
31763190
self.configs.temp_data["initial_scripts_dir"] = args.initial_scripts_dir
@@ -3392,7 +3406,7 @@ class ControlScript(object):
33923406
"--callhome", choices=BOOL_CHOICES,
33933407
help=argparse.SUPPRESS)
33943408
cur_parser.add_argument(
3395-
"--ui", choices=BOOL_CHOICES, default="true", metavar="",
3409+
"--ui", choices=BOOL_CHOICES, metavar="",
33963410
help="Toggle enabling or disabling webserver UI. Default true.")
33973411
cur_parser.add_argument(
33983412
"--ysql_enable_auth", choices=BOOL_CHOICES,
@@ -3560,6 +3574,7 @@ class Configs(object):
35603574
"database_password": None,
35613575
"current_masters": "",
35623576
"ui": True,
3577+
"dns_enabled": False,
35633578
}
35643579
# Used to store data specific to certain functions that we don't want to save.
35653580
self.temp_data = {
@@ -3743,7 +3758,6 @@ class ProcessManager(object):
37433758
def temp_func():
37443759
return self.is_proc_running(pid)
37453760
retry_op(temp_func, timeout=60)
3746-
time.sleep(2)
37473761
return
37483762

37493763
# Delete corresponding pidfile for this process.
@@ -4142,7 +4156,12 @@ class YsqlProxy(object):
41424156
env_var = os.environ.copy()
41434157
env_var["PGUSER"] = self.username
41444158
shell = subprocess.Popen(cmd, env=env_var)
4145-
shell.communicate()
4159+
while True:
4160+
try:
4161+
shell.communicate()
4162+
except KeyboardInterrupt:
4163+
continue
4164+
break
41464165

41474166
# Checks if db exists.
41484167
# Note that this will return false if ysqlsh can't connect, even if db exists.
@@ -4256,7 +4275,12 @@ class YcqlProxy(object):
42564275
if self.keyspace is not None:
42574276
cmd.extend(["-k", self.keyspace])
42584277
shell = subprocess.Popen(cmd)
4259-
shell.communicate()
4278+
while True:
4279+
try:
4280+
shell.communicate()
4281+
except KeyboardInterrupt:
4282+
continue
4283+
break
42604284

42614285
# Check user exists
42624286
# Note that this will return false if ycqlsh can't connect, even if user exists.

build-support/common-build-env.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2171,10 +2171,13 @@ run_shellcheck() {
21712171
build-support/common-build-env.sh
21722172
build-support/common-cli-env.sh
21732173
build-support/common-test-env.sh
2174+
build-support/jenkins/common-lto.sh
21742175
build-support/compiler-wrappers/compiler-wrapper.sh
21752176
build-support/find_linuxbrew.sh
2176-
build-support/jenkins/build-and-test.sh
2177+
build-support/jenkins/build.sh
2178+
build-support/jenkins/test.sh
21772179
build-support/jenkins/yb-jenkins-build.sh
2180+
build-support/jenkins/yb-jenkins-test.sh
21782181
build-support/run-test.sh
21792182
yb_build.sh
21802183
)

0 commit comments

Comments
 (0)