From 0cdf63668d5df74d58d8eb5a155cdf2d4693c9cf Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Tue, 4 Jun 2019 15:22:39 +0200 Subject: T1379: Deprecated functions in /sbin/dhclient-script --- src/conf_mode/host_name.py | 321 +++++++++++++++++++++++---------------------- 1 file changed, 167 insertions(+), 154 deletions(-) (limited to 'src/conf_mode/host_name.py') diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index 81a52e87f..621ccd7e0 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -23,14 +23,19 @@ conf-mode script for 'system host-name' and 'system domain-name'. import os import re import sys -import subprocess import copy -import jinja2 import glob +import argparse +import jinja2 from vyos.config import Config from vyos import ConfigError + +parser = argparse.ArgumentParser() +parser.add_argument("--dhclient", action="store_true", + help="Started from dhclient-script") + config_file_hosts = '/etc/hosts' config_file_resolv = '/etc/resolv.conf' @@ -72,32 +77,6 @@ search {{ domain_search | join(" ") }} """ -# borrowed from: https://github.com/donjajo/py-world/blob/master/resolvconfReader.py, THX! -def get_resolvers(file): - resolvers = [] - try: - with open(file, 'r') as resolvconf: - for line in resolvconf.readlines(): - line = line.split('#',1)[0]; - line = line.rstrip(); - if 'nameserver' in line: - resolvers.append(line.split()[1]) - return resolvers - except IOError: - return [] - -def get_dhcp_search_doms(file): - search_doms = [] - try: - with open(file, 'r') as resolvconf: - for line in resolvconf.readlines(): - line = line.split('#',1)[0]; - line = line.rstrip(); - if 'search' in line: - return re.sub('^search','',line).lstrip().split() - except IOError: - return [] - default_config_data = { 'hostname': 'vyos', 'domain_name': '', @@ -106,158 +85,192 @@ default_config_data = { 'no_dhcp_ns': False } -def get_config(): - conf = Config() - hosts = copy.deepcopy(default_config_data) +# borrowed from: https://github.com/donjajo/py-world/blob/master/resolvconfReader.py, THX! +def get_resolvers(file): + resolv = {} + try: + with open(file, 'r') as resolvconf: + lines = [line.split('#', 1)[0].rstrip() + for line in resolvconf.readlines()] + resolvers = [line.split()[1] + for line in lines if 'nameserver' in line] + domains = [line.split()[1] for line in lines if 'search' in line] + resolv['resolvers'] = resolvers + resolv['domains'] = domains + return resolv + except IOError: + return [] - if conf.exists("system host-name"): - hosts['hostname'] = conf.return_value("system host-name") - if conf.exists("system domain-name"): - hosts['domain_name'] = conf.return_value("system domain-name") - hosts['domain_search'].append(hosts['domain_name']) +def get_config(arguments): + conf = Config() + hosts = copy.deepcopy(default_config_data) - for search in conf.return_values("system domain-search domain"): - hosts['domain_search'].append(search) + if arguments.dhclient: + conf.exists = conf.exists_effective + conf.return_value = conf.return_effective_value + conf.return_values = conf.return_effective_values - if conf.exists("system name-server"): - hosts['nameserver'] = conf.return_values("system name-server") + if conf.exists("system host-name"): + hosts['hostname'] = conf.return_value("system host-name") - if conf.exists("system disable-dhcp-nameservers"): - hosts['no_dhcp_ns'] = conf.exists('system disable-dhcp-nameservers') + if conf.exists("system domain-name"): + hosts['domain_name'] = conf.return_value("system domain-name") + hosts['domain_search'].append(hosts['domain_name']) - ## system static-host-mapping - hosts['static_host_mapping'] = { 'hostnames' : {}} + for search in conf.return_values("system domain-search domain"): + hosts['domain_search'].append(search) - if conf.exists('system static-host-mapping host-name'): - for hn in conf.list_nodes('system static-host-mapping host-name'): - hosts['static_host_mapping']['hostnames'][hn] = { - 'ipaddr' : conf.return_value('system static-host-mapping host-name ' + hn + ' inet'), - 'alias' : '' - } - - if conf.exists('system static-host-mapping host-name ' + hn + ' alias'): - a = conf.return_values('system static-host-mapping host-name ' + hn + ' alias') - hosts['static_host_mapping']['hostnames'][hn]['alias'] = " ".join( conf.return_values('system static-host-mapping host-name ' + hn + ' alias') ) + if conf.exists("system name-server"): + hosts['nameserver'] = conf.return_values("system name-server") - return hosts + if conf.exists("system disable-dhcp-nameservers"): + hosts['no_dhcp_ns'] = conf.exists('system disable-dhcp-nameservers') -def verify(config): - if config is None: - return None + # system static-host-mapping + hosts['static_host_mapping'] = {'hostnames': {}} - # pattern $VAR(@) "^[[:alnum:]][-.[:alnum:]]*[[:alnum:]]$" ; "invalid host name $VAR(@)" - hostname_regex = re.compile("^[A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9]$") - if not hostname_regex.match(config['hostname']): - raise ConfigError('Invalid host name ' + config["hostname"]) + if conf.exists('system static-host-mapping host-name'): + for hn in conf.list_nodes('system static-host-mapping host-name'): + hosts['static_host_mapping']['hostnames'][hn] = { + 'ipaddr': conf.return_value('system static-host-mapping host-name ' + hn + ' inet'), + 'alias': '' + } - # pattern $VAR(@) "^.{1,63}$" ; "invalid host-name length" - length = len(config['hostname']) - if length < 1 or length > 63: - raise ConfigError('Invalid host-name length, must be less than 63 characters') + if conf.exists('system static-host-mapping host-name ' + hn + ' alias'): + a = conf.return_values( + 'system static-host-mapping host-name ' + hn + ' alias') + hosts['static_host_mapping']['hostnames'][hn]['alias'] = " ".join(a) - # The search list is currently limited to six domains with a total of 256 characters. - # https://linux.die.net/man/5/resolv.conf - if len(config['domain_search']) > 6: - raise ConfigError('The search list is currently limited to six domains') + return hosts - tmp = ' '.join(config['domain_search']) - if len(tmp) > 256: - raise ConfigError('The search list is currently limited to 256 characters') - # static mappings alias hostname - if config['static_host_mapping']['hostnames']: - for hn in config['static_host_mapping']['hostnames']: - if not config['static_host_mapping']['hostnames'][hn]['ipaddr']: - raise ConfigError('IP address required for ' + hn) - for hn_alias in config['static_host_mapping']['hostnames'][hn]['alias'].split(' '): - if not hostname_regex.match(hn_alias) and len (hn_alias) !=0: - raise ConfigError('Invalid hostname alias ' + hn_alias) +def verify(config): + if config is None: + return None + + # pattern $VAR(@) "^[[:alnum:]][-.[:alnum:]]*[[:alnum:]]$" ; "invalid host name $VAR(@)" + hostname_regex = re.compile("^[A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9]$") + if not hostname_regex.match(config['hostname']): + raise ConfigError('Invalid host name ' + config["hostname"]) + + # pattern $VAR(@) "^.{1,63}$" ; "invalid host-name length" + length = len(config['hostname']) + if length < 1 or length > 63: + raise ConfigError( + 'Invalid host-name length, must be less than 63 characters') + + # The search list is currently limited to six domains with a total of 256 characters. + # https://linux.die.net/man/5/resolv.conf + if len(config['domain_search']) > 6: + raise ConfigError( + 'The search list is currently limited to six domains') + + tmp = ' '.join(config['domain_search']) + if len(tmp) > 256: + raise ConfigError( + 'The search list is currently limited to 256 characters') + + # static mappings alias hostname + if config['static_host_mapping']['hostnames']: + for hn in config['static_host_mapping']['hostnames']: + if not config['static_host_mapping']['hostnames'][hn]['ipaddr']: + raise ConfigError('IP address required for ' + hn) + for hn_alias in config['static_host_mapping']['hostnames'][hn]['alias'].split(' '): + if not hostname_regex.match(hn_alias) and len(hn_alias) != 0: + raise ConfigError('Invalid hostname alias ' + hn_alias) + + return None - return None def generate(config): - if config is None: + if config is None: + return None + + # If "system disable-dhcp-nameservers" is __configured__ all DNS resolvers + # received via dhclient should not be added into the final 'resolv.conf'. + # + # We iterate over every resolver file and retrieve the received nameservers + # for later adjustment of the system nameservers + dhcp_ns = [] + dhcp_sd = [] + for file in glob.glob('/etc/resolv.conf.dhclient-new*'): + for key, value in get_resolvers(file).items(): + ns = [r for r in value if key == 'resolvers'] + dhcp_ns.extend(ns) + sd = [d for d in value if key == 'domains'] + dhcp_sd.extend(sd) + + if not config['no_dhcp_ns']: + config['nameserver'] += dhcp_ns + config['domain_search'] += dhcp_sd + + # We have third party scripts altering /etc/hosts, too. + # One example are the DHCP hostname update scripts thus we need to cache in + # every modification first - so changing domain-name, domain-search or hostname + # during runtime works + old_hosts = "" + with open(config_file_hosts, 'r') as f: + # Skips text before the beginning of our marker. + # NOTE: Marker __MUST__ match the one specified in config_tmpl_hosts + for line in f: + if line.strip() == '### modifications from other scripts should be added below': + break + + for line in f: + # This additional line.strip() filters empty lines + if line.strip(): + old_hosts += line + + # Add an additional newline + old_hosts += '\n' + + tmpl = jinja2.Template(config_tmpl_hosts) + config_text = tmpl.render(config) + + with open(config_file_hosts, 'w') as f: + f.write(config_text) + f.write(old_hosts) + + tmpl = jinja2.Template(config_tmpl_resolv) + config_text = tmpl.render(config) + with open(config_file_resolv, 'w') as f: + f.write(config_text) + return None - # If "system disable-dhcp-nameservers" is __configured__ all DNS resolvers - # received via dhclient should not be added into the final 'resolv.conf'. - # - # We iterate over every resolver file and retrieve the received nameservers - # for later adjustment of the system nameservers - dhcp_ns = [] - for file in glob.glob('/etc/resolv.conf.dhclient-new*'): - for r in get_resolvers(file): - dhcp_ns.append(r) - - if not config['no_dhcp_ns']: - config['nameserver'] += dhcp_ns - for file in glob.glob('/etc/resolv.conf.dhclient-new*'): - config['domain_search'] = get_dhcp_search_doms(file) - - # We have third party scripts altering /etc/hosts, too. - # One example are the DHCP hostname update scripts thus we need to cache in - # every modification first - so changing domain-name, domain-search or hostname - # during runtime works - old_hosts = "" - with open(config_file_hosts, 'r') as f: - # Skips text before the beginning of our marker. - # NOTE: Marker __MUST__ match the one specified in config_tmpl_hosts - for line in f: - if line.strip() == '### modifications from other scripts should be added below': - break - - for line in f: - # This additional line.strip() filters empty lines - if line.strip(): - old_hosts += line - - # Add an additional newline - old_hosts += '\n' - - tmpl = jinja2.Template(config_tmpl_hosts) - config_text = tmpl.render(config) - - with open(config_file_hosts, 'w') as f: - f.write(config_text) - f.write(old_hosts) - - tmpl = jinja2.Template(config_tmpl_resolv) - config_text = tmpl.render(config) - with open(config_file_resolv, 'w') as f: - f.write(config_text) - - return None def apply(config): - if config is None: - return None + if config is None: + return None - fqdn = config['hostname'] - if config['domain_name']: - fqdn += '.' + config['domain_name'] + fqdn = config['hostname'] + if config['domain_name']: + fqdn += '.' + config['domain_name'] - os.system("hostnamectl set-hostname --static {0}".format(fqdn.rstrip('.'))) + os.system("hostnamectl set-hostname --static {0}".format(fqdn.rstrip('.'))) - # Restart services that use the hostname - os.system("systemctl restart rsyslog.service") + # Restart services that use the hostname + os.system("systemctl restart rsyslog.service") - # If SNMP is running, restart it too - if os.system("pgrep snmpd > /dev/null") == 0: - os.system("systemctl restart snmpd.service") + # If SNMP is running, restart it too + if os.system("pgrep snmpd > /dev/null") == 0: + os.system("systemctl restart snmpd.service") - # restart pdns if it is used - if os.system("/usr/bin/rec_control ping >/dev/null 2>&1") == 0: - os.system("/etc/init.d/pdns-recursor restart >/dev/null") + # restart pdns if it is used + if os.system("/usr/bin/rec_control ping >/dev/null 2>&1") == 0: + os.system("/etc/init.d/pdns-recursor restart >/dev/null") + + return None - return None if __name__ == '__main__': - try: - c = get_config() - verify(c) - generate(c) - apply(c) - except ConfigError as e: - print(e) - sys.exit(1) + args = parser.parse_args() + try: + c = get_config(args) + verify(c) + generate(c) + apply(c) + except ConfigError as e: + print(e) + sys.exit(1) -- cgit v1.2.3 From 0f354688d7bd63b63fb91faf17a38c77fb05f660 Mon Sep 17 00:00:00 2001 From: hagbard Date: Mon, 17 Jun 2019 11:10:33 -0700 Subject: [syslog/hostname.py] T1394 - syslog systemd and host_name.py race condition - checking if the hostname has changed, otherwise the script and systemd try to restart rsyslogd at the same time, at the end it's not started at all. --- src/conf_mode/host_name.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/conf_mode/host_name.py') diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index 621ccd7e0..0d03fd41c 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -248,10 +248,15 @@ def apply(config): if config['domain_name']: fqdn += '.' + config['domain_name'] + # rsyslog runs into a race condition at boot time with systemd + # restart rsyslog only if the hostname changed. + hn = subprocess.check_output(['hostnamectl','--static']).decode().strip() + os.system("hostnamectl set-hostname --static {0}".format(fqdn.rstrip('.'))) # Restart services that use the hostname - os.system("systemctl restart rsyslog.service") + if hn != fqdn: + os.system("systemctl restart rsyslog.service") # If SNMP is running, restart it too if os.system("pgrep snmpd > /dev/null") == 0: -- cgit v1.2.3 From 0037287a8e6a7ddd6d4a8101804d9cc0b8b3e70f Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Tue, 18 Jun 2019 16:08:08 +0200 Subject: [ config ] T1447: Python subprocess called without import in host_name.py --- src/conf_mode/host_name.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/conf_mode/host_name.py') diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index 0d03fd41c..13b2b98ae 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -25,6 +25,7 @@ import re import sys import copy import glob +import subprocess import argparse import jinja2 @@ -250,13 +251,13 @@ def apply(config): # rsyslog runs into a race condition at boot time with systemd # restart rsyslog only if the hostname changed. - hn = subprocess.check_output(['hostnamectl','--static']).decode().strip() + hn = subprocess.check_output(['hostnamectl', '--static']).decode().strip() os.system("hostnamectl set-hostname --static {0}".format(fqdn.rstrip('.'))) # Restart services that use the hostname if hn != fqdn: - os.system("systemctl restart rsyslog.service") + os.system("systemctl restart rsyslog.service") # If SNMP is running, restart it too if os.system("pgrep snmpd > /dev/null") == 0: -- cgit v1.2.3 From 06e6ae3bac7cd39341c0b19b570020649d725344 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Thu, 20 Jun 2019 10:33:56 +0200 Subject: T1458: Regression in 1.2.1-S2 hostname & logging --- src/conf_mode/host_name.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/conf_mode/host_name.py') diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index 13b2b98ae..b0a4648c7 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -42,7 +42,8 @@ config_file_resolv = '/etc/resolv.conf' config_tmpl_hosts = """ ### Autogenerated by host_name.py ### -127.0.0.1 localhost {{ hostname }}{% if domain_name %}.{{ domain_name }}{% endif %} +127.0.0.1 localhost +127.0.1.1 {{ hostname }}{% if domain_name %}.{{ domain_name }}{% endif %} # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback -- cgit v1.2.3 From 6c2b62eafa0e2224fdc492c55d255228593ad960 Mon Sep 17 00:00:00 2001 From: UnicronNL Date: Tue, 2 Jul 2019 20:49:06 +0200 Subject: T1497: "set system name-server" generates invalid/incorrect resolv.conf --- src/conf_mode/host_name.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/conf_mode/host_name.py') diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index b0a4648c7..43f36dd35 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -124,7 +124,10 @@ def get_config(arguments): hosts['domain_search'].append(search) if conf.exists("system name-server"): - hosts['nameserver'] = conf.return_values("system name-server") + if not isinstance(conf.return_values("system name-server"), list): + hosts['nameserver'] = conf.return_values("system name-server").replace("'", "").split() + else: + hosts['nameserver'] = conf.return_values("system name-server") if conf.exists("system disable-dhcp-nameservers"): hosts['no_dhcp_ns'] = conf.exists('system disable-dhcp-nameservers') -- cgit v1.2.3 From acd5f855bcca98008719d0ef371be3076861b4f1 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Wed, 3 Jul 2019 12:41:33 +0200 Subject: T1497: remove the no longer necessary workaround for bad return_effective_values output. --- src/conf_mode/host_name.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/conf_mode/host_name.py') diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index 43f36dd35..b0a4648c7 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -124,10 +124,7 @@ def get_config(arguments): hosts['domain_search'].append(search) if conf.exists("system name-server"): - if not isinstance(conf.return_values("system name-server"), list): - hosts['nameserver'] = conf.return_values("system name-server").replace("'", "").split() - else: - hosts['nameserver'] = conf.return_values("system name-server") + hosts['nameserver'] = conf.return_values("system name-server") if conf.exists("system disable-dhcp-nameservers"): hosts['no_dhcp_ns'] = conf.exists('system disable-dhcp-nameservers') -- cgit v1.2.3 From 6b759f81fec573859798a6d3f971bfaa0b1960c6 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Wed, 3 Jul 2019 13:29:52 +0200 Subject: T1497: make host_name.py wait for commit lock too. --- src/conf_mode/host_name.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/conf_mode/host_name.py') diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index b0a4648c7..6fb7031a8 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -29,6 +29,8 @@ import subprocess import argparse import jinja2 +import vyos.util + from vyos.config import Config from vyos import ConfigError @@ -273,6 +275,13 @@ def apply(config): if __name__ == '__main__': args = parser.parse_args() + + if args.dhclient: + # There's a big chance it was triggered by a commit still in progress + # so we need to wait until the new values are in the running config + vyos.util.wait_for_commit_lock() + + try: c = get_config(args) verify(c) -- cgit v1.2.3 From 02e5bb55d3922516cfe53016202d58924b72950a Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Tue, 9 Jul 2019 18:07:50 +0200 Subject: T1497: remove duplicate name servers and search domains obtained from DHCP. --- src/conf_mode/host_name.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/conf_mode/host_name.py') diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index 6fb7031a8..eb4b339e9 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -209,6 +209,12 @@ def generate(config): config['nameserver'] += dhcp_ns config['domain_search'] += dhcp_sd + # Prune duplicate values + # Not order preserving, but then when multiple DHCP clients are used, + # there can't be guarantees about the order anyway + dhcp_ns = list(set(dhcp_ns)) + dhcp_sd = list(set(dhcp_sd)) + # We have third party scripts altering /etc/hosts, too. # One example are the DHCP hostname update scripts thus we need to cache in # every modification first - so changing domain-name, domain-search or hostname -- cgit v1.2.3 From 5c4e5e9a6a893aa2fb0df50cf327e942b52995b9 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Fri, 12 Jul 2019 15:31:10 +0200 Subject: Do not try to verify the hostname config if the script is run by cloud-init. --- src/conf_mode/host_name.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/conf_mode/host_name.py') diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index eb4b339e9..1988f7b4f 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -117,6 +117,10 @@ def get_config(arguments): if conf.exists("system host-name"): hosts['hostname'] = conf.return_value("system host-name") + # This may happen if the config is not loaded yet, + # e.g. if run by cloud-init + if not hosts['hostname']: + hosts['hostname'] = default_config_data['hostname'] if conf.exists("system domain-name"): hosts['domain_name'] = conf.return_value("system domain-name") @@ -290,7 +294,12 @@ if __name__ == '__main__': try: c = get_config(args) - verify(c) + # If it's called from dhclient, then either: + # a) verification was already done at commit time + # b) it's run on an unconfigured system, e.g. by cloud-init + # Therefore, verification is either redundant or useless + if not args.dhclient: + verify(c) generate(c) apply(c) except ConfigError as e: -- cgit v1.2.3 From f62f31fb14aeaff70edb53d0be2d501916e8e39c Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Tue, 16 Jul 2019 23:02:32 +0200 Subject: T1531: do not include the domain name in system hostname. --- src/conf_mode/host_name.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/conf_mode/host_name.py') diff --git a/src/conf_mode/host_name.py b/src/conf_mode/host_name.py index 1988f7b4f..16467c8df 100755 --- a/src/conf_mode/host_name.py +++ b/src/conf_mode/host_name.py @@ -258,18 +258,17 @@ def apply(config): if config is None: return None - fqdn = config['hostname'] - if config['domain_name']: - fqdn += '.' + config['domain_name'] + # No domain name -- the Debian way. + hostname_new = config['hostname'] # rsyslog runs into a race condition at boot time with systemd # restart rsyslog only if the hostname changed. - hn = subprocess.check_output(['hostnamectl', '--static']).decode().strip() + hostname_old = subprocess.check_output(['hostnamectl', '--static']).decode().strip() - os.system("hostnamectl set-hostname --static {0}".format(fqdn.rstrip('.'))) + os.system("hostnamectl set-hostname --static {0}".format(hostname_new)) # Restart services that use the hostname - if hn != fqdn: + if hostname_new != hostname_old: os.system("systemctl restart rsyslog.service") # If SNMP is running, restart it too -- cgit v1.2.3