diff options
467 files changed, 7711 insertions, 7868 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9186d280d22..ec2bd244fe4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -656,6 +656,9 @@ if(WITH_GRAFANA) add_subdirectory(monitoring/grafana/dashboards) endif() +CMAKE_DEPENDENT_OPTION(WITH_BOOST_VALGRIND "Boost support for valgrind" OFF + "NOT WITH_SYSTEM_BOOST" OFF) + include(CTags) option(CTAG_EXCLUDES "Exclude files/directories when running ctag.") add_tags(ctags diff --git a/PendingReleaseNotes b/PendingReleaseNotes index c9fd4c79451..cffac983c11 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -316,3 +316,8 @@ If the zonegroup is part of a realm, the change must be committed with 'radosgw-admin period update --commit' - otherwise the change will take effect after radosgws are restarted. + +* Monitors now have config option ``mon_allow_pool_size_one``, which is disabled + by default. However, if enabled, user now have to pass the + ``--yes-i-really-mean-it`` flag to ``osd pool set size 1``, if they are really + sure of configuring pool size 1. diff --git a/admin/build-doc b/admin/build-doc index 5a81dad2668..6f4483de0c8 100755 --- a/admin/build-doc +++ b/admin/build-doc @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh cd "$(dirname "$0")" cd .. @@ -31,17 +31,15 @@ elif command -v yum >/dev/null; then exit 1 fi else - for command in virtualenv doxygen ant ditaa cython; do - command -v "$command" > /dev/null; - ret_code=$? - if [ $ret_code -ne 0 ]; then + for command in dot virtualenv doxygen ant ditaa cython; do + if ! command -v "$command" > /dev/null; then # add a space after old values - missing="${missing:+$missing }$command" - fi + missing="${missing:+$missing }$command" + fi done if [ -n "$missing" ]; then - echo "$0: missing required command, please install them:" 1>&2 - echo "$missing" + echo "$0: missing required command, please install them:" 1>&2 + echo "$missing" 1>&2 exit 1 fi fi @@ -82,10 +80,14 @@ for bind in rados rbd cephfs rgw; do fi ln -sf lib${bind}.so.1 $vdir/lib/lib${bind}.so gcc -shared -o $vdir/lib/lib${bind}.so.1 -xc /dev/null + ld_flags="-Wl,-rpath,$vdir/lib" + if [ $(uname) != Darwin ]; then + ld_flags="${ld_flags},--no-as-needed" + fi BUILD_DOC=1 \ CFLAGS="-iquote$TOPDIR/src/include" \ CPPFLAGS="-iquote$TOPDIR/src/include" \ - LDFLAGS="-L$vdir/lib -Wl,--no-as-needed" \ + LDFLAGS="-L$vdir/lib ${ld_flags}" \ $vdir/bin/pip install --upgrade $TOPDIR/src/pybind/${bind} # rgwfile_version(), librgw_create(), rgw_mount() # since py3.5, distutils adds postfix in between ${bind} and so @@ -93,8 +95,13 @@ for bind in rados rbd cephfs rgw; do if [ ! -e $lib_fn ]; then lib_fn=$vdir/lib/python*/*-packages/${bind}.so fi - nm $lib_fn | grep -E "U (lib)?${bind}" | \ - awk '{ print "void "$2"(void) {}" }' | \ + if [ ${bind} = "cephfs" ]; then + func_prefix="ceph" + else + func_prefix="(lib)?${bind}" + fi + nm $lib_fn | grep -E "U (_)?${func_prefix}" | \ + awk '{ gsub(/^_/,"",$2); print "void "$2"(void) {}" }' | \ gcc -shared -o $vdir/lib/lib${bind}.so.1 -xc - if [ ${bind} != rados ]; then rm -f $TOPDIR/src/pybind/${bind}/rados.pxd diff --git a/ceph.spec.in b/ceph.spec.in index 44feb4d8814..9cb04a79a67 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -43,26 +43,21 @@ %global _remote_tarball_prefix https://download.ceph.com/tarballs/ %endif %if 0%{?suse_version} -%bcond_with selinux -%bcond_with cephfs_java %bcond_with amqp_endpoint +%bcond_with cephfs_java %bcond_with kafka_endpoint -#Compat macro for new _fillupdir macro introduced in Nov 2017 -%if ! %{defined _fillupdir} -%global _fillupdir /var/adm/fillup-templates -%endif -%if 0%{?is_opensuse} -%bcond_without libradosstriper -%bcond_without ocf -%else %bcond_with libradosstriper -%bcond_with ocf -%endif %ifarch x86_64 aarch64 ppc64le %bcond_without lttng %else %bcond_with lttng %endif +%bcond_with ocf +%bcond_with selinux +#Compat macro for _fillupdir macro introduced in Nov 2017 +%if ! %{defined _fillupdir} +%global _fillupdir /var/adm/fillup-templates +%endif %endif %bcond_with seastar %if 0%{?fedora} || 0%{?suse_version} >= 1500 @@ -243,6 +238,22 @@ BuildRequires: protobuf-devel BuildRequires: ragel BuildRequires: systemtap-sdt-devel BuildRequires: yaml-cpp-devel +%if 0%{?fedora} +BuildRequires: fmt-devel +BuildRequires: libubsan +BuildRequires: libasan +BuildRequires: libatomic +%endif +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-8-libubsan +BuildRequires: devtoolset-8-libasan +BuildRequires: devtoolset-8-libatomic +%endif +%if 0%{?rhel} >= 8 +BuildRequires: libubsan +BuildRequires: libasan +BuildRequires: libatomic +%endif %endif ################################################################################# # distro-conditional dependencies diff --git a/cmake/modules/BuildBoost.cmake b/cmake/modules/BuildBoost.cmake index 2e92132366c..aa548e9ff61 100644 --- a/cmake/modules/BuildBoost.cmake +++ b/cmake/modules/BuildBoost.cmake @@ -131,6 +131,9 @@ function(do_build_boost version) list(APPEND b2 architecture=arm) list(APPEND b2 binary-format=elf) endif() + if(WITH_BOOST_VALGRIND) + list(APPEND b2 valgrind=on) + endif() set(build_command ${b2} headers stage #"--buildid=ceph" # changes lib names--can omit for static @@ -224,6 +227,10 @@ macro(build_boost version) INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}" IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" IMPORTED_LOCATION "${Boost_${upper_c}_LIBRARY}") + if((c MATCHES "coroutine|context") AND (WITH_BOOST_VALGRIND)) + set_target_properties(Boost::${c} PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "BOOST_USE_VALGRIND") + endif() list(APPEND Boost_LIBRARIES ${Boost_${upper_c}_LIBRARY}) endforeach() foreach(c ${Boost_BUILD_COMPONENTS}) diff --git a/doc/cephadm/drivegroups.rst b/doc/cephadm/drivegroups.rst index 8497559f486..29c8e388a33 100644 --- a/doc/cephadm/drivegroups.rst +++ b/doc/cephadm/drivegroups.rst @@ -10,7 +10,7 @@ with which configuration without knowing the specifics of device names and paths Instead of doing this:: - [monitor 1] # ceph orchestrator osd create *<host>*:*<path-to-device>* + [monitor 1] # ceph orch daemon add osd *<host>*:*<path-to-device>* for each device and each host, we can define a yaml|json file that allows us to describe the layout. Here's the most basic example. @@ -32,7 +32,7 @@ There will be a more detailed section on host_pattern down below. and pass it to `osd create` like so:: - [monitor 1] # ceph orchestrator osd create -i /path/to/drivegroup.yml + [monitor 1] # ceph orch apply osd -i /path/to/drivegroup.yml This will go out on all the matching hosts and deploy these OSDs. diff --git a/doc/cephadm/install.rst b/doc/cephadm/install.rst index afdbb8ba257..6ed70f28118 100644 --- a/doc/cephadm/install.rst +++ b/doc/cephadm/install.rst @@ -289,7 +289,7 @@ There are a few ways to create new OSDs: based on their properties, such device type (SSD or HDD), device model names, size, or the hosts on which the devices exist:: - # ceph orch osd create -i spec.yml + # ceph orch apply osd -i spec.yml Deploy MDSs diff --git a/doc/cephfs/createfs.rst b/doc/cephfs/createfs.rst index 11c54a1cd3c..b5246d8eb33 100644 --- a/doc/cephfs/createfs.rst +++ b/doc/cephfs/createfs.rst @@ -68,8 +68,8 @@ choose which to use when mounting. - `Mount CephFS`_ - `Mount CephFS as FUSE`_ -.. _Mount CephFS: ../../cephfs/kernel -.. _Mount CephFS as FUSE: ../../cephfs/fuse +.. _Mount CephFS: ../../cephfs/mount-using-kernel-driver +.. _Mount CephFS as FUSE: ../../cephfs/mount-using-fuse If you have created more than one file system, and a client does not specify a file system when mounting, you can control which file system diff --git a/doc/dev/osd_internals/log_based_pg.rst b/doc/dev/osd_internals/log_based_pg.rst index a1e27539151..31733182194 100644 --- a/doc/dev/osd_internals/log_based_pg.rst +++ b/doc/dev/osd_internals/log_based_pg.rst @@ -37,7 +37,7 @@ operations extending back at least far enough to include any *unstable* writes (writes which have been started but not committed) and objects which aren't uptodate locally (see recovery and backfill). In practice, the log will extend much further -(osd_pg_min_log_entries when clean, osd_pg_max_log_entries when not +(osd_min_pg_log_entries when clean, osd_max_pg_log_entries when not clean) because it's handy for quickly performing recovery. Using this log, as long as we talk to a non-empty subset of the OSDs diff --git a/doc/install/ceph-deploy/quick-cephfs.rst b/doc/install/ceph-deploy/quick-cephfs.rst index e8ca28f86ee..403525152f9 100644 --- a/doc/install/ceph-deploy/quick-cephfs.rst +++ b/doc/install/ceph-deploy/quick-cephfs.rst @@ -206,7 +206,7 @@ encounter trouble. .. _OS Recommendations: ../os-recommendations .. _Placement Group: ../../rados/operations/placement-groups .. _mount.ceph man page: ../../man/8/mount.ceph -.. _Mount CephFS using Kernel Driver: ../cephfs/kernel +.. _Mount CephFS using Kernel Driver: ../../cephfs/mount-using-kernel-driver .. _ceph-fuse man page: ../../man/8/ceph-fuse -.. _Mount CephFS using FUSE: ../../cephfs/fuse +.. _Mount CephFS using FUSE: ../../cephfs/mount-using-fuse .. _Erasure Code: ../../rados/operations/erasure-code diff --git a/doc/man/8/ceph-fuse.rst b/doc/man/8/ceph-fuse.rst index 91888a79546..f230626b8ae 100644 --- a/doc/man/8/ceph-fuse.rst +++ b/doc/man/8/ceph-fuse.rst @@ -82,4 +82,4 @@ See also fusermount(8), :doc:`ceph <ceph>`\(8) -.. _Mount CephFS using FUSE: ../../../cephfs/fuse/ +.. _Mount CephFS using FUSE: ../../../cephfs/mount-using-fuse/ diff --git a/doc/rados/operations/operating.rst b/doc/rados/operations/operating.rst index fcfd5268ae6..ab10990f39b 100644 --- a/doc/rados/operations/operating.rst +++ b/doc/rados/operations/operating.rst @@ -93,9 +93,10 @@ For example:: sudo systemctl stop ceph-mds@ceph-server -.. index:: Ceph service; Upstart; operating a cluster - +.. index:: Upstart; operating a cluster +Running Ceph with Upstart +========================== Starting all Daemons -------------------- @@ -171,11 +172,10 @@ For example:: sudo start ceph-mds id=ceph-server -.. index:: Ceph service; sysvinit; operating a cluster +.. index:: sysvinit; operating a cluster - -Running Ceph -============ +Running Ceph with sysvinit +========================== Each time you to **start**, **restart**, and **stop** Ceph daemons (or your entire cluster) you must specify at least one option and one command. You may diff --git a/doc/radosgw/STSLite.rst b/doc/radosgw/STSLite.rst index 350e36bc610..0d8989bd3b8 100644 --- a/doc/radosgw/STSLite.rst +++ b/doc/radosgw/STSLite.rst @@ -37,14 +37,16 @@ Parameters: An end user needs to attach a policy to allow invocation of GetSessionToken API using its permanent credentials and to allow subsequent s3 operations invocation using only the temporary credentials returned by GetSessionToken. -The following is an example of attaching the policy to a user 'TESTER1':: - - s3curl.pl --debug --id admin -- -s -v -X POST "http://localhost:8000/?Action=PutUserPolicy&PolicyName=Policy1&UserName=TESTER1&PolicyDocument=\{\"Version\":\"2012-10-17\",\"Statement\":\[\{\"Effect\":\"Deny\",\"Action\":\"s3:*\",\"Resource\":\[\"*\"\],\"Condition\":\{\"BoolIfExists\":\{\"sts:authentication\":\"false\"\}\}\},\{\"Effect\":\"Allow\",\"Action\":\"sts:GetSessionToken\",\"Resource\":\"*\",\"Condition\":\{\"BoolIfExists\":\{\"sts:authentication\":\"false\"\}\}\}\]\}&Version=2010-05-08" The user attaching the policy needs to have admin caps. For example:: radosgw-admin caps add --uid="TESTER" --caps="user-policy=*" +The following is the policy that needs to be attached to a user 'TESTER1':: + + user_policy = "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Deny\",\"Action\":\"s3:*\",\"Resource\":[\"*\"],\"Condition\":{\"BoolIfExists\":{\"sts:authentication\":\"false\"}}},{\"Effect\":\"Allow\",\"Action\":\"sts:GetSessionToken\",\"Resource\":\"*\",\"Condition\":{\"BoolIfExists\":{\"sts:authentication\":\"false\"}}}]}" + + STS Lite Configuration ====================== diff --git a/doc/radosgw/dynamicresharding.rst b/doc/radosgw/dynamicresharding.rst index 355c8b02d69..efced98a906 100644 --- a/doc/radosgw/dynamicresharding.rst +++ b/doc/radosgw/dynamicresharding.rst @@ -21,7 +21,7 @@ reduction of the number of entries in each bucket index shard. This process is transparent to the user. By default dynamic bucket index resharding can only increase the -number of bucket index sharts to 1999, although the upper-bound is a +number of bucket index shards to 1999, although the upper-bound is a configuration parameter (see Configuration below). Furthermore, when possible, the process chooses a prime number of bucket index shards to help spread the number of bucket index entries across the bucket index diff --git a/doc/rbd/rbd-snapshot.rst b/doc/rbd/rbd-snapshot.rst index 5aaa23e5d19..94405c48505 100644 --- a/doc/rbd/rbd-snapshot.rst +++ b/doc/rbd/rbd-snapshot.rst @@ -12,7 +12,7 @@ quickly and easily. Ceph supports block device snapshots using the ``rbd`` command and many higher level interfaces, including `QEMU`_, `libvirt`_, `OpenStack`_ and `CloudStack`_. -.. important:: To use use RBD snapshots, you must have a running Ceph cluster. +.. important:: To use RBD snapshots, you must have a running Ceph cluster. .. note:: Because RBD does not know about the file system, snapshots are `crash-consistent` if they are not coordinated with the mounting diff --git a/qa/standalone/ceph-helpers.sh b/qa/standalone/ceph-helpers.sh index 19fede19480..1d4aa4e5fb3 100755 --- a/qa/standalone/ceph-helpers.sh +++ b/qa/standalone/ceph-helpers.sh @@ -478,6 +478,7 @@ function run_mon() { --run-dir=$dir \ --pid-file=$dir/\$name.pid \ --mon-allow-pool-delete \ + --mon-allow-pool-size-one \ --osd-pool-default-pg-autoscale-mode off \ --mon-osd-backfillfull-ratio .99 \ "$@" || return 1 diff --git a/qa/standalone/mon/health-mute.sh b/qa/standalone/mon/health-mute.sh index a255798b82f..d8e07ca061b 100755 --- a/qa/standalone/mon/health-mute.sh +++ b/qa/standalone/mon/health-mute.sh @@ -38,7 +38,7 @@ function TEST_mute() { ceph -s ceph health | grep HEALTH_OK || return 1 # test warning on setting pool size=1 - ceph osd pool set foo size 1 + ceph osd pool set foo size 1 --yes-i-really-mean-it ceph -s ceph health | grep HEALTH_WARN || return 1 ceph health detail | grep POOL_NO_REDUNDANCY || return 1 diff --git a/qa/standalone/osd/osd-backfill-prio.sh b/qa/standalone/osd/osd-backfill-prio.sh index a089696bb9b..c8c05ce19fb 100755 --- a/qa/standalone/osd/osd-backfill-prio.sh +++ b/qa/standalone/osd/osd-backfill-prio.sh @@ -129,8 +129,8 @@ function TEST_backfill_priority() { fi done - ceph osd pool set $pool2 size 1 - ceph osd pool set $pool3 size 1 + ceph osd pool set $pool2 size 1 --yes-i-really-mean-it + ceph osd pool set $pool3 size 1 --yes-i-really-mean-it wait_for_clean || return 1 dd if=/dev/urandom of=$dir/data bs=1M count=10 @@ -405,9 +405,9 @@ function TEST_backfill_pool_priority() { pool1_prio=$(expr $DEGRADED_PRIO + 1 + $pool1_extra_prio) pool2_prio=$(expr $DEGRADED_PRIO + 1 + $pool2_extra_prio) - ceph osd pool set $pool1 size 1 + ceph osd pool set $pool1 size 1 --yes-i-really-mean-it ceph osd pool set $pool1 recovery_priority $pool1_extra_prio - ceph osd pool set $pool2 size 1 + ceph osd pool set $pool2 size 1 --yes-i-really-mean-it ceph osd pool set $pool2 recovery_priority $pool2_extra_prio wait_for_clean || return 1 diff --git a/qa/standalone/osd/osd-backfill-recovery-log.sh b/qa/standalone/osd/osd-backfill-recovery-log.sh index 53582958334..6f20d90b5b5 100755 --- a/qa/standalone/osd/osd-backfill-recovery-log.sh +++ b/qa/standalone/osd/osd-backfill-recovery-log.sh @@ -74,6 +74,8 @@ function _common_test() { sleep 1 wait_for_clean + flush_pg_stats + newprimary=$(ceph pg dump pgs --format=json | jq '.pg_stats[0].up_primary') kill_daemons diff --git a/qa/standalone/osd/osd-backfill-space.sh b/qa/standalone/osd/osd-backfill-space.sh index 3978668eae2..b2a1a821fdb 100755 --- a/qa/standalone/osd/osd-backfill-space.sh +++ b/qa/standalone/osd/osd-backfill-space.sh @@ -124,7 +124,7 @@ function TEST_backfill_test_simple() { for p in $(seq 1 $pools) do create_pool "${poolprefix}$p" 1 1 - ceph osd pool set "${poolprefix}$p" size 1 + ceph osd pool set "${poolprefix}$p" size 1 --yes-i-really-mean-it done wait_for_clean || return 1 @@ -206,7 +206,7 @@ function TEST_backfill_test_multi() { for p in $(seq 1 $pools) do create_pool "${poolprefix}$p" 1 1 - ceph osd pool set "${poolprefix}$p" size 1 + ceph osd pool set "${poolprefix}$p" size 1 --yes-i-really-mean-it done wait_for_clean || return 1 @@ -364,8 +364,8 @@ function TEST_backfill_test_sametarget() { fi done - ceph osd pool set $pool1 size 1 - ceph osd pool set $pool2 size 1 + ceph osd pool set $pool1 size 1 --yes-i-really-mean-it + ceph osd pool set $pool2 size 1 --yes-i-really-mean-it wait_for_clean || return 1 @@ -444,7 +444,7 @@ function TEST_backfill_multi_partial() { ceph osd set-require-min-compat-client luminous create_pool fillpool 1 1 - ceph osd pool set fillpool size 1 + ceph osd pool set fillpool size 1 --yes-i-really-mean-it for p in $(seq 1 $pools) do create_pool "${poolprefix}$p" 1 1 @@ -639,7 +639,7 @@ function TEST_ec_backfill_simple() { ceph osd set-backfillfull-ratio .85 create_pool fillpool 1 1 - ceph osd pool set fillpool size 1 + ceph osd pool set fillpool size 1 --yes-i-really-mean-it # Partially fill an osd # We have room for 200 18K replicated objects, if we create 13K objects @@ -770,7 +770,7 @@ function TEST_ec_backfill_multi() { ceph osd set-require-min-compat-client luminous create_pool fillpool 1 1 - ceph osd pool set fillpool size 1 + ceph osd pool set fillpool size 1 --yes-i-really-mean-it # Partially fill an osd # We have room for 200 18K replicated objects, if we create 9K objects @@ -888,7 +888,7 @@ function SKIP_TEST_ec_backfill_multi_partial() { ceph osd set-require-min-compat-client luminous create_pool fillpool 1 1 - ceph osd pool set fillpool size 1 + ceph osd pool set fillpool size 1 --yes-i-really-mean-it # last osd ceph osd pg-upmap 1.0 $lastosd @@ -1010,7 +1010,7 @@ function SKIP_TEST_ec_backfill_multi_partial() { ceph osd set-require-min-compat-client luminous create_pool fillpool 1 1 - ceph osd pool set fillpool size 1 + ceph osd pool set fillpool size 1 --yes-i-really-mean-it # Partially fill an osd # We have room for 200 48K ec objects, if we create 4k replicated objects diff --git a/qa/standalone/osd/osd-backfill-stats.sh b/qa/standalone/osd/osd-backfill-stats.sh index ea43b00fe46..a5010d7264d 100755 --- a/qa/standalone/osd/osd-backfill-stats.sh +++ b/qa/standalone/osd/osd-backfill-stats.sh @@ -143,7 +143,7 @@ function TEST_backfill_sizeup() { run_osd $dir 5 || return 1 create_pool $poolname 1 1 - ceph osd pool set $poolname size 1 + ceph osd pool set $poolname size 1 --yes-i-really-mean-it wait_for_clean || return 1 @@ -189,7 +189,7 @@ function TEST_backfill_sizeup_out() { run_osd $dir 5 || return 1 create_pool $poolname 1 1 - ceph osd pool set $poolname size 1 + ceph osd pool set $poolname size 1 --yes-i-really-mean-it wait_for_clean || return 1 @@ -353,6 +353,7 @@ function TEST_backfill_out2() { sleep 2 primary=$(get_primary $poolname obj1) ceph osd unset nobackfill + ceph tell osd.$primary get_latest_osdmap ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 @@ -410,6 +411,7 @@ function TEST_backfill_sizeup4_allout() { sleep 2 primary=$(get_primary $poolname obj1) ceph osd unset nobackfill + ceph tell osd.$primary get_latest_osdmap ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 @@ -474,6 +476,7 @@ function TEST_backfill_remapped() { primary=$(get_primary $poolname obj1) ceph osd unset nobackfill + ceph tell osd.$primary get_latest_osdmap ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 @@ -534,6 +537,7 @@ function TEST_backfill_ec_all_out() { sleep 2 primary=$(get_primary $poolname obj1) ceph osd unset nobackfill + ceph tell osd.$primary get_latest_osdmap ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 @@ -584,6 +588,7 @@ function TEST_backfill_ec_prim_out() { sleep 2 primary=$(get_primary $poolname obj1) ceph osd unset nobackfill + ceph tell osd.$primary get_latest_osdmap ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 @@ -642,6 +647,7 @@ function TEST_backfill_ec_down_all_out() { sleep 2 primary=$(get_primary $poolname obj1) ceph osd unset nobackfill + ceph tell osd.$primary get_latest_osdmap ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 flush_pg_stats @@ -726,6 +732,7 @@ function TEST_backfill_ec_down_out() { sleep 2 primary=$(get_primary $poolname obj1) ceph osd unset nobackfill + ceph tell osd.$primary get_latest_osdmap ceph tell osd.$primary debug kick_recovery_wq 0 sleep 2 diff --git a/qa/standalone/osd/osd-markdown.sh b/qa/standalone/osd/osd-markdown.sh index d24463064bd..5c4a784406d 100755 --- a/qa/standalone/osd/osd-markdown.sh +++ b/qa/standalone/osd/osd-markdown.sh @@ -42,6 +42,7 @@ function markdown_N_impl() { for i in `seq 1 $markdown_times` do # check the OSD is UP + ceph tell osd.0 get_latest_osdmap || return 1 ceph osd tree ceph osd tree | grep osd.0 |grep up || return 1 # mark the OSD down. @@ -98,6 +99,7 @@ function TEST_markdown_boot() { markdown_N_impl $count $period $sleeptime #down N times, osd.0 should be up sleep 15 # give osd plenty of time to notice and come back up + ceph tell osd.0 get_latest_osdmap || return 1 ceph osd tree | grep up | grep osd.0 || return 1 } @@ -121,6 +123,7 @@ function TEST_markdown_boot_exceed_time() { markdown_N_impl $(($count+1)) $period $sleeptime sleep 15 # give osd plenty of time to notice and come back up + ceph tell osd.0 get_latest_osdmap || return 1 ceph osd tree | grep up | grep osd.0 || return 1 } diff --git a/qa/standalone/osd/osd-recovery-prio.sh b/qa/standalone/osd/osd-recovery-prio.sh index fb386e265ab..672b407de90 100755 --- a/qa/standalone/osd/osd-recovery-prio.sh +++ b/qa/standalone/osd/osd-recovery-prio.sh @@ -125,8 +125,8 @@ function TEST_recovery_priority() { fi done - ceph osd pool set $pool2 size 1 - ceph osd pool set $pool3 size 1 + ceph osd pool set $pool2 size 1 --yes-i-really-mean-it + ceph osd pool set $pool3 size 1 --yes-i-really-mean-it wait_for_clean || return 1 dd if=/dev/urandom of=$dir/data bs=1M count=10 @@ -401,9 +401,9 @@ function TEST_recovery_pool_priority() { pool1_prio=$(expr $NORMAL_PRIO + $pool1_extra_prio) pool2_prio=$(expr $NORMAL_PRIO + $pool2_extra_prio) - ceph osd pool set $pool1 size 1 + ceph osd pool set $pool1 size 1 --yes-i-really-mean-it ceph osd pool set $pool1 recovery_priority $pool1_extra_prio - ceph osd pool set $pool2 size 1 + ceph osd pool set $pool2 size 1 --yes-i-really-mean-it ceph osd pool set $pool2 recovery_priority $pool2_extra_prio wait_for_clean || return 1 diff --git a/qa/standalone/osd/osd-recovery-space.sh b/qa/standalone/osd/osd-recovery-space.sh index 82cdf82e573..07ed09b4380 100755 --- a/qa/standalone/osd/osd-recovery-space.sh +++ b/qa/standalone/osd/osd-recovery-space.sh @@ -105,7 +105,7 @@ function TEST_recovery_test_simple() { for p in $(seq 1 $pools) do create_pool "${poolprefix}$p" 1 1 - ceph osd pool set "${poolprefix}$p" size 1 + ceph osd pool set "${poolprefix}$p" size 1 --yes-i-really-mean-it done wait_for_clean || return 1 diff --git a/qa/standalone/osd/osd-recovery-stats.sh b/qa/standalone/osd/osd-recovery-stats.sh index b6955bb4c60..7d88e98a0c0 100755 --- a/qa/standalone/osd/osd-recovery-stats.sh +++ b/qa/standalone/osd/osd-recovery-stats.sh @@ -314,7 +314,7 @@ function TEST_recovery_undersized() { done create_pool $poolname 1 1 - ceph osd pool set $poolname size 1 + ceph osd pool set $poolname size 1 --yes-i-really-mean-it wait_for_clean || return 1 diff --git a/qa/suites/rados/dashboard/tasks/dashboard.yaml b/qa/suites/rados/dashboard/tasks/dashboard.yaml index bf99644817b..e61294eeed9 100644 --- a/qa/suites/rados/dashboard/tasks/dashboard.yaml +++ b/qa/suites/rados/dashboard/tasks/dashboard.yaml @@ -33,6 +33,7 @@ tasks: - tasks.mgr.dashboard.test_auth - tasks.mgr.dashboard.test_cephfs - tasks.mgr.dashboard.test_cluster_configuration + - tasks.mgr.dashboard.test_crush_rule - tasks.mgr.dashboard.test_erasure_code_profile - tasks.mgr.dashboard.test_ganesha - tasks.mgr.dashboard.test_health diff --git a/qa/tasks/ceph.conf.template b/qa/tasks/ceph.conf.template index 493eacb32ca..6eff6e339a0 100644 --- a/qa/tasks/ceph.conf.template +++ b/qa/tasks/ceph.conf.template @@ -30,6 +30,7 @@ mon warn on too few osds = false mon_warn_on_pool_pg_num_not_power_of_two = false mon_warn_on_pool_no_redundancy = false + mon_allow_pool_size_one = true osd pool default erasure code profile = "plugin=jerasure technique=reed_sol_van k=2 m=1 ruleset-failure-domain=osd crush-failure-domain=osd" diff --git a/qa/tasks/ceph_fuse.py b/qa/tasks/ceph_fuse.py index 4f06e2b7630..1439ccffd56 100644 --- a/qa/tasks/ceph_fuse.py +++ b/qa/tasks/ceph_fuse.py @@ -6,7 +6,7 @@ import contextlib import logging from teuthology import misc as teuthology -from cephfs.fuse_mount import FuseMount +from tasks.cephfs.fuse_mount import FuseMount log = logging.getLogger(__name__) diff --git a/qa/tasks/cephfs/cephfs_test_case.py b/qa/tasks/cephfs/cephfs_test_case.py index d9464dd4135..4d649ebda0f 100644 --- a/qa/tasks/cephfs/cephfs_test_case.py +++ b/qa/tasks/cephfs/cephfs_test_case.py @@ -4,7 +4,6 @@ import logging from tasks.ceph_test_case import CephTestCase import os import re -from StringIO import StringIO from tasks.cephfs.fuse_mount import FuseMount @@ -260,21 +259,21 @@ class CephFSTestCase(CephTestCase): def delete_mds_coredump(self, daemon_id): # delete coredump file, otherwise teuthology.internal.coredump will # catch it later and treat it as a failure. - p = self.mds_cluster.mds_daemons[daemon_id].remote.run(args=[ - "sudo", "sysctl", "-n", "kernel.core_pattern"], stdout=StringIO()) - core_dir = os.path.dirname(p.stdout.getvalue().strip()) + core_pattern = self.mds_cluster.mds_daemons[daemon_id].remote.sh( + "sudo sysctl -n kernel.core_pattern") + core_dir = os.path.dirname(core_pattern.strip()) if core_dir: # Non-default core_pattern with a directory in it # We have seen a core_pattern that looks like it's from teuthology's coredump # task, so proceed to clear out the core file log.info("Clearing core from directory: {0}".format(core_dir)) # Verify that we see the expected single coredump - ls_proc = self.mds_cluster.mds_daemons[daemon_id].remote.run(args=[ + ls_output = self.mds_cluster.mds_daemons[daemon_id].remote.sh([ "cd", core_dir, run.Raw('&&'), "sudo", "ls", run.Raw('|'), "sudo", "xargs", "file" - ], stdout=StringIO()) + ]) cores = [l.partition(":")[0] - for l in ls_proc.stdout.getvalue().strip().split("\n") + for l in ls_output.strip().split("\n") if re.match(r'.*ceph-mds.* -i +{0}'.format(daemon_id), l)] log.info("Enumerated cores: {0}".format(cores)) diff --git a/qa/tasks/cephfs/fuse_mount.py b/qa/tasks/cephfs/fuse_mount.py index 21a9a6d2f16..c23e1f54caf 100644 --- a/qa/tasks/cephfs/fuse_mount.py +++ b/qa/tasks/cephfs/fuse_mount.py @@ -1,14 +1,17 @@ -from StringIO import StringIO +from io import BytesIO import json import time import logging + +import six + from textwrap import dedent from teuthology import misc from teuthology.contextutil import MaxWhileTries from teuthology.orchestra import run from teuthology.orchestra.run import CommandFailedError -from .mount import CephFSMount +from tasks.cephfs.mount import CephFSMount log = logging.getLogger(__name__) @@ -96,16 +99,12 @@ class FuseMount(CephFSMount): check_status=False, timeout=(15*60) ) - p = self.client_remote.run( - args=["ls", "/sys/fs/fuse/connections"], - stdout=StringIO(), - check_status=False, - timeout=(15*60) - ) - if p.exitstatus != 0: + try: + ls_str = self.client_remote.sh("ls /sys/fs/fuse/connections", + timeout=(15*60)).strip() + except CommandFailedError: return [] - ls_str = p.stdout.getvalue().strip() if ls_str: return [int(n) for n in ls_str.split("\n")] else: @@ -188,16 +187,17 @@ class FuseMount(CephFSMount): self.mountpoint, ], cwd=self.test_dir, - stdout=StringIO(), - stderr=StringIO(), + stdout=BytesIO(), + stderr=BytesIO(), wait=False, timeout=(15*60) ) try: proc.wait() except CommandFailedError: - if ("endpoint is not connected" in proc.stderr.getvalue() - or "Software caused connection abort" in proc.stderr.getvalue()): + error = six.ensure_str(proc.stderr.getvalue()) + if ("endpoint is not connected" in error + or "Software caused connection abort" in error): # This happens is fuse is killed without unmount log.warn("Found stale moutn point at {0}".format(self.mountpoint)) return True @@ -206,7 +206,7 @@ class FuseMount(CephFSMount): log.info('mount point does not exist: %s', self.mountpoint) return False - fstype = proc.stdout.getvalue().rstrip('\n') + fstype = six.ensure_str(proc.stdout.getvalue()).rstrip('\n') if fstype == 'fuseblk': log.info('ceph-fuse is mounted on %s', self.mountpoint) return True @@ -231,11 +231,11 @@ class FuseMount(CephFSMount): # Now that we're mounted, set permissions so that the rest of the test will have # unrestricted access to the filesystem mount. try: - stderr = StringIO() + stderr = BytesIO() self.client_remote.run(args=['sudo', 'chmod', '1777', self.mountpoint], timeout=(15*60), cwd=self.test_dir, stderr=stderr) except run.CommandFailedError: stderr = stderr.getvalue() - if "Read-only file system".lower() in stderr.lower(): + if b"Read-only file system".lower() in stderr.lower(): pass else: raise @@ -278,7 +278,7 @@ class FuseMount(CephFSMount): """).format(self._fuse_conn)) self._fuse_conn = None - stderr = StringIO() + stderr = BytesIO() try: # make sure its unmounted self.client_remote.run( @@ -345,7 +345,7 @@ class FuseMount(CephFSMount): Prerequisite: the client is not mounted. """ - stderr = StringIO() + stderr = BytesIO() try: self.client_remote.run( args=[ @@ -359,7 +359,7 @@ class FuseMount(CephFSMount): check_status=False, ) except CommandFailedError: - if "No such file or directory" in stderr.getvalue(): + if b"No such file or directory" in stderr.getvalue(): pass else: raise @@ -444,17 +444,16 @@ print(find_socket("{client_name}")) client_name="client.{0}".format(self.client_id)) # Find the admin socket - p = self.client_remote.run(args=[ + asok_path = self.client_remote.sh([ 'sudo', 'python3', '-c', pyscript - ], stdout=StringIO(), timeout=(15*60)) - asok_path = p.stdout.getvalue().strip() + ], timeout=(15*60)).strip() log.info("Found client admin socket at {0}".format(asok_path)) # Query client ID from admin socket - p = self.client_remote.run( - args=['sudo', self._prefix + 'ceph', '--admin-daemon', asok_path] + args, - stdout=StringIO(), timeout=(15*60)) - return json.loads(p.stdout.getvalue()) + json_data = self.client_remote.sh( + ['sudo', self._prefix + 'ceph', '--admin-daemon', asok_path] + args, + timeout=(15*60)) + return json.loads(json_data) def get_global_id(self): """ diff --git a/qa/tasks/cephfs/kernel_mount.py b/qa/tasks/cephfs/kernel_mount.py index 86a06006df7..769edd975f1 100644 --- a/qa/tasks/cephfs/kernel_mount.py +++ b/qa/tasks/cephfs/kernel_mount.py @@ -1,4 +1,3 @@ -from StringIO import StringIO import json import logging import time @@ -211,10 +210,10 @@ class KernelMount(CephFSMount): print(json.dumps(get_id_to_dir())) """) - p = self.client_remote.run(args=[ + output = self.client_remote.sh([ 'sudo', 'python3', '-c', pyscript - ], stdout=StringIO(), timeout=(5*60)) - client_id_to_dir = json.loads(p.stdout.getvalue()) + ], timeout=(5*60)) + client_id_to_dir = json.loads(output) try: return client_id_to_dir[self.client_id] @@ -233,10 +232,10 @@ class KernelMount(CephFSMount): print(open(os.path.join("{debug_dir}", "{filename}")).read()) """).format(debug_dir=debug_dir, filename=filename) - p = self.client_remote.run(args=[ + output = self.client_remote.sh([ 'sudo', 'python3', '-c', pyscript - ], stdout=StringIO(), timeout=(5*60)) - return p.stdout.getvalue() + ], timeout=(5*60)) + return output def get_global_id(self): """ diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index aeed4fa2043..b48be1d2ddd 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -1,11 +1,12 @@ from contextlib import contextmanager +from io import BytesIO import json import logging import datetime +import six import time from textwrap import dedent import os -from StringIO import StringIO from teuthology.orchestra import run from teuthology.orchestra.run import CommandFailedError, ConnectionLostError from tasks.cephfs.filesystem import Filesystem @@ -184,12 +185,12 @@ class CephFSMount(object): return self.client_remote.run( args=['sudo', 'adjust-ulimits', 'daemon-helper', 'kill', py_version, '-c', pyscript], wait=False, stdin=run.PIPE, - stdout=StringIO()) + stdout=BytesIO()) def run_python(self, pyscript, py_version='python3'): p = self._run_python(pyscript, py_version) p.wait() - return p.stdout.getvalue().strip() + return six.ensure_str(p.stdout.getvalue().strip()) def run_shell(self, args, wait=True, stdin=None, check_status=True, omit_sudo=True): @@ -197,8 +198,8 @@ class CephFSMount(object): args = args.split() args = ["cd", self.mountpoint, run.Raw('&&'), "sudo"] + args - return self.client_remote.run(args=args, stdout=StringIO(), - stderr=StringIO(), wait=wait, + return self.client_remote.run(args=args, stdout=BytesIO(), + stderr=BytesIO(), wait=wait, stdin=stdin, check_status=check_status, omit_sudo=omit_sudo) diff --git a/qa/tasks/cephfs/test_acls.py b/qa/tasks/cephfs/test_acls.py index 586cbde765c..39f30c97c63 100644 --- a/qa/tasks/cephfs/test_acls.py +++ b/qa/tasks/cephfs/test_acls.py @@ -1,6 +1,6 @@ import logging -from StringIO import StringIO +from io import BytesIO from xfstests_dev import XFSTestsDev log = logging.getLogger(__name__) @@ -22,6 +22,6 @@ class TestACLs(XFSTestsDev): log.info('client is kernel mounted') self.mount_a.client_remote.run(args=['sudo', './check', - 'generic/099'], cwd=self.repo_path, stdout=StringIO(), - stderr=StringIO(), timeout=30, check_status=True, + 'generic/099'], cwd=self.repo_path, stdout=BytesIO(), + stderr=BytesIO(), timeout=30, check_status=True, label='running tests for ACLs from xfstests-dev') diff --git a/qa/tasks/cephfs/test_cephfs_shell.py b/qa/tasks/cephfs/test_cephfs_shell.py index 6a26cdd9fc9..cfb37322489 100644 --- a/qa/tasks/cephfs/test_cephfs_shell.py +++ b/qa/tasks/cephfs/test_cephfs_shell.py @@ -2,15 +2,16 @@ Before running this testsuite, add path to cephfs-shell module to $PATH and export $PATH. """ +from io import BytesIO from os import path import crypt import logging from tempfile import mkstemp as tempfile_mkstemp import math +from six import ensure_str from sys import version_info as sys_version_info from re import search as re_search from time import sleep -from StringIO import StringIO from tasks.cephfs.cephfs_test_case import CephFSTestCase from teuthology.misc import sudo_write_file from teuthology.orchestra.run import CommandFailedError @@ -52,23 +53,23 @@ class TestCephFSShell(CephFSTestCase): args.extend(("--", cmd)) log.info("Running command: {}".format(" ".join(args))) - return mount_x.client_remote.run(args=args, stdout=StringIO(), - stderr=StringIO(), stdin=stdin) + return mount_x.client_remote.run(args=args, stdout=BytesIO(), + stderr=BytesIO(), stdin=stdin) def get_cephfs_shell_cmd_error(self, cmd, mount_x=None, opts=None, stdin=None): - return self.run_cephfs_shell_cmd(cmd, mount_x, opts, stdin).stderr.\ - getvalue().strip() + return ensure_str(self.run_cephfs_shell_cmd(cmd, mount_x, opts, stdin).stderr.\ + getvalue().strip()) def get_cephfs_shell_cmd_output(self, cmd, mount_x=None, opts=None, stdin=None, config_path=None): - return self.run_cephfs_shell_cmd(cmd, mount_x, opts, stdin, + return ensure_str(self.run_cephfs_shell_cmd(cmd, mount_x, opts, stdin, config_path).\ - stdout.getvalue().strip() + stdout.getvalue().strip()) def get_cephfs_shell_script_output(self, script, mount_x=None, stdin=None): - return self.run_cephfs_shell_script(script, mount_x, stdin).stdout.\ - getvalue().strip() + return ensure_str(self.run_cephfs_shell_script(script, mount_x, stdin).stdout.\ + getvalue().strip()) def run_cephfs_shell_script(self, script, mount_x=None, stdin=None): if mount_x is None: @@ -83,8 +84,8 @@ class TestCephFSShell(CephFSTestCase): args = ["cephfs-shell", "-c", mount_x.config_path, '-b', scriptpath] log.info('Running script \"' + scriptpath + '\"') - return mount_x.client_remote.run(args=args, stdout=StringIO(), - stderr=StringIO(), stdin=stdin) + return mount_x.client_remote.run(args=args, stdout=BytesIO(), + stderr=BytesIO(), stdin=stdin) class TestMkdir(TestCephFSShell): def test_mkdir(self): @@ -749,7 +750,7 @@ class TestDF(TestCephFSShell): def test_df_for_invalid_directory(self): dir_abspath = path.join(self.mount_a.mountpoint, 'non-existent-dir') proc = self.run_cephfs_shell_cmd('df ' + dir_abspath) - assert proc.stderr.getvalue().find('error in stat') != -1 + assert proc.stderr.getvalue().find(b'error in stat') != -1 def test_df_for_valid_file(self): s = 'df test' * 14145016 @@ -924,9 +925,9 @@ class TestMisc(TestCephFSShell): dirname = 'somedirectory' self.run_cephfs_shell_cmd(['mkdir', dirname]) - output = self.mount_a.client_remote.run(args=['cephfs-shell', '-c', - self.mount_a.config_path, 'ls'], - stdout=StringIO()).stdout.getvalue().strip() + output = self.mount_a.client_remote.sh([ + 'cephfs-shell', '-c', self.mount_a.config_path, 'ls' + ]).strip() if sys_version_info.major >= 3: self.assertRegex(dirname, output) diff --git a/qa/tasks/cephfs/test_exports.py b/qa/tasks/cephfs/test_exports.py index 060131add70..bd895e381b5 100644 --- a/qa/tasks/cephfs/test_exports.py +++ b/qa/tasks/cephfs/test_exports.py @@ -1,6 +1,5 @@ import logging import time -from StringIO import StringIO from tasks.cephfs.fuse_mount import FuseMount from tasks.cephfs.cephfs_test_case import CephFSTestCase @@ -129,7 +128,7 @@ class TestExports(CephFSTestCase): self._wait_subtrees(status, 0, [('/1', 1), ('/1/2', 0), ('/1/2/3', 2)]) if not isinstance(self.mount_a, FuseMount): - p = self.mount_a.client_remote.run(args=['uname', '-r'], stdout=StringIO(), wait=True) + p = self.mount_a.client_remote.sh('uname -r'), wait=True) dir_pin = self.mount_a.getfattr("1", "ceph.dir.pin") log.debug("mount.getfattr('1','ceph.dir.pin'): %s " % dir_pin) if str(p.stdout.getvalue()) < "5" and not(dir_pin): diff --git a/qa/tasks/cephfs/test_journal_migration.py b/qa/tasks/cephfs/test_journal_migration.py index 9d1d399caa8..8863b371f39 100644 --- a/qa/tasks/cephfs/test_journal_migration.py +++ b/qa/tasks/cephfs/test_journal_migration.py @@ -1,5 +1,4 @@ -from StringIO import StringIO from tasks.cephfs.cephfs_test_case import CephFSTestCase from tasks.workunit import task as workunit @@ -76,14 +75,12 @@ class TestJournalMigration(CephFSTestCase): self.fs.journal_tool(["event", "get", "json", "--path", "/tmp/journal.json"], 0) - p = self.fs.tool_remote.run( - args=[ + p = self.fs.tool_remote.sh([ "python3", "-c", "import json; print(len(json.load(open('/tmp/journal.json'))))" - ], - stdout=StringIO()) - event_count = int(p.stdout.getvalue().strip()) + ]) + event_count = int(p.strip()) if event_count < 1000: # Approximate value of "lots", expected from having run fsstress raise RuntimeError("Unexpectedly few journal events: {0}".format(event_count)) diff --git a/qa/tasks/cephfs/xfstests_dev.py b/qa/tasks/cephfs/xfstests_dev.py index 15ee52ca5e8..a4286132c11 100644 --- a/qa/tasks/cephfs/xfstests_dev.py +++ b/qa/tasks/cephfs/xfstests_dev.py @@ -1,6 +1,6 @@ +from io import BytesIO import six import logging -from StringIO import StringIO from tasks.cephfs.cephfs_test_case import CephFSTestCase logger = logging.getLogger(__name__) @@ -28,11 +28,11 @@ class XFSTestsDev(CephFSTestCase): # NOTE: On teuthology machines it's necessary to run "make" as # superuser since the repo is cloned somewhere in /tmp. self.mount_a.client_remote.run(args=['sudo', 'make'], - cwd=self.repo_path, stdout=StringIO(), - stderr=StringIO()) + cwd=self.repo_path, stdout=BytesIO(), + stderr=BytesIO()) self.mount_a.client_remote.run(args=['sudo', 'make', 'install'], cwd=self.repo_path, omit_sudo=False, - stdout=StringIO(), stderr=StringIO()) + stdout=BytesIO(), stderr=BytesIO()) def get_repo(self): """ diff --git a/qa/tasks/devstack.py b/qa/tasks/devstack.py index 943a9ffffa2..8e08c038931 100644 --- a/qa/tasks/devstack.py +++ b/qa/tasks/devstack.py @@ -1,9 +1,11 @@ #!/usr/bin/env python import contextlib import logging -from cStringIO import StringIO +from io import BytesIO import textwrap from configparser import ConfigParser + +import six import time from teuthology.orchestra import run @@ -140,7 +142,7 @@ def distribute_ceph_keys(devstack_node, ceph_node): log.info("Copying Ceph keys to DevStack node...") def copy_key(from_remote, key_name, to_remote, dest_path, owner): - key_stringio = StringIO() + key_stringio = BytesIO() from_remote.run( args=['sudo', 'ceph', 'auth', 'get-or-create', key_name], stdout=key_stringio) @@ -172,14 +174,8 @@ def distribute_ceph_keys(devstack_node, ceph_node): def set_libvirt_secret(devstack_node, ceph_node): log.info("Setting libvirt secret...") - cinder_key_stringio = StringIO() - ceph_node.run(args=['sudo', 'ceph', 'auth', 'get-key', 'client.cinder'], - stdout=cinder_key_stringio) - cinder_key = cinder_key_stringio.getvalue().strip() - - uuid_stringio = StringIO() - devstack_node.run(args=['uuidgen'], stdout=uuid_stringio) - uuid = uuid_stringio.getvalue().strip() + cinder_key = ceph_node.sh('sudo ceph auth get-key client.cinder').strip() + uuid = devstack_node.sh('uuidgen').strip() secret_path = '/tmp/secret.xml' secret_template = textwrap.dedent(""" @@ -210,7 +206,7 @@ def update_devstack_config_files(devstack_node, secret_uuid): parser.read_file(config_stream) for (key, value) in update_dict.items(): parser.set(section, key, value) - out_stream = StringIO() + out_stream = six.StringIO() parser.write(out_stream) out_stream.seek(0) return out_stream @@ -254,8 +250,8 @@ def update_devstack_config_files(devstack_node, secret_uuid): for update in updates: file_name = update['name'] options = update['options'] - config_str = misc.get_file(devstack_node, file_name, sudo=True) - config_stream = StringIO(config_str) + config_data = misc.get_file(devstack_node, file_name, sudo=True) + config_stream = six.StringIO(config_data) backup_config(devstack_node, file_name) new_config_stream = update_config(file_name, config_stream, options) misc.sudo_write_file(devstack_node, file_name, new_config_stream) @@ -352,21 +348,17 @@ def create_volume(devstack_node, ceph_node, vol_name, size): size=size)) args = ['source', 'devstack/openrc', run.Raw('&&'), 'cinder', 'create', '--display-name', vol_name, size] - out_stream = StringIO() - devstack_node.run(args=args, stdout=out_stream, wait=True) - vol_info = parse_os_table(out_stream.getvalue()) + cinder_create = devstack_node.sh(args, wait=True) + vol_info = parse_os_table(cinder_create) log.debug("Volume info: %s", str(vol_info)) - out_stream = StringIO() try: - ceph_node.run(args="rbd --id cinder ls -l volumes", stdout=out_stream, - wait=True) + rbd_output = ceph_node.sh("rbd --id cinder ls -l volumes", wait=True) except run.CommandFailedError: log.debug("Original rbd call failed; retrying without '--id cinder'") - ceph_node.run(args="rbd ls -l volumes", stdout=out_stream, - wait=True) + rbd_output = ceph_node.sh("rbd ls -l volumes", wait=True) - assert vol_info['id'] in out_stream.getvalue(), \ + assert vol_info['id'] in rbd_output, \ "Volume not found on Ceph cluster" assert vol_info['size'] == size, \ "Volume size on Ceph cluster is different than specified" diff --git a/qa/tasks/kclient.py b/qa/tasks/kclient.py index 88f27366a71..50d557f3ce7 100644 --- a/qa/tasks/kclient.py +++ b/qa/tasks/kclient.py @@ -8,7 +8,7 @@ from teuthology.misc import deep_merge from teuthology.orchestra.run import CommandFailedError from teuthology import misc from teuthology.contextutil import MaxWhileTries -from cephfs.kernel_mount import KernelMount +from tasks.cephfs.kernel_mount import KernelMount log = logging.getLogger(__name__) diff --git a/qa/tasks/keystone.py b/qa/tasks/keystone.py index 4433ce20464..4ef4707c5cd 100644 --- a/qa/tasks/keystone.py +++ b/qa/tasks/keystone.py @@ -4,7 +4,6 @@ Deploy and configure Keystone for Teuthology import argparse import contextlib import logging -from cStringIO import StringIO from teuthology import misc as teuthology from teuthology import contextutil @@ -28,11 +27,9 @@ def run_in_keystone_dir(ctx, client, args, **kwargs): def get_toxvenv_dir(ctx): return ctx.tox.venv_path -def run_in_tox_venv(ctx, remote, args, **kwargs): - return remote.run( - args=[ 'source', '{}/bin/activate'.format(get_toxvenv_dir(ctx)), run.Raw('&&') ] + args, - **kwargs - ) +def toxvenv_sh(ctx, remote, args, **kwargs): + activate = get_toxvenv_dir(ctx) + '/bin/activate' + return remote.sh(['source', activate, run.Raw('&&')] + args, **kwargs) def run_in_keystone_venv(ctx, client, args): run_in_keystone_dir(ctx, client, @@ -107,12 +104,10 @@ def install_packages(ctx, config): for (client, _) in config.items(): (remote,) = ctx.cluster.only(client).remotes.keys() # use bindep to read which dependencies we need from keystone/bindep.txt - run_in_tox_venv(ctx, remote, ['pip', 'install', 'bindep']) - r = run_in_tox_venv(ctx, remote, + toxvenv_sh(ctx, remote, ['pip', 'install', 'bindep']) + packages[client] = toxvenv_sh(ctx, remote, ['bindep', '--brief', '--file', '{}/bindep.txt'.format(get_keystone_dir(ctx))], - stdout=StringIO(), - check_status=False) # returns 1 on success? - packages[client] = r.stdout.getvalue().splitlines() + check_status=False).splitlines() # returns 1 on success? for dep in packages[client]: install_package(dep, remote) try: diff --git a/qa/tasks/mgr/test_crash.py b/qa/tasks/mgr/test_crash.py index 149221e9f60..aeeb89e9814 100644 --- a/qa/tasks/mgr/test_crash.py +++ b/qa/tasks/mgr/test_crash.py @@ -1,6 +1,6 @@ -from mgr_test_case import MgrTestCase +from tasks.mgr.mgr_test_case import MgrTestCase import json import logging diff --git a/qa/tasks/qemu.py b/qa/tasks/qemu.py index 0b77ff5d310..2a0cb40fba0 100644 --- a/qa/tasks/qemu.py +++ b/qa/tasks/qemu.py @@ -1,7 +1,6 @@ """ Qemu task """ -from cStringIO import StringIO import contextlib import logging @@ -172,7 +171,7 @@ def generate_iso(ctx, config): user_data = user_data.format( ceph_branch=ctx.config.get('branch'), ceph_sha1=ctx.config.get('sha1')) - teuthology.write_file(remote, userdata_path, StringIO(user_data)) + teuthology.write_file(remote, userdata_path, user_data) with open(os.path.join(src_dir, 'metadata.yaml'), 'rb') as f: teuthology.write_file(remote, metadata_path, f) diff --git a/qa/tasks/radosgw_admin.py b/qa/tasks/radosgw_admin.py index e91c3d835a3..9f9f80e8cc4 100644 --- a/qa/tasks/radosgw_admin.py +++ b/qa/tasks/radosgw_admin.py @@ -17,8 +17,9 @@ import datetime import Queue import sys +import six -from cStringIO import StringIO +from io import BytesIO import boto.exception import boto.s3.connection @@ -1038,7 +1039,7 @@ def task(ctx, config): out['placement_pools'].append(rule) (err, out) = rgwadmin(ctx, client, ['zone', 'set'], - stdin=StringIO(json.dumps(out)), + stdin=BytesIO(six.ensure_binary(json.dumps(out))), check_status=True) (err, out) = rgwadmin(ctx, client, ['zone', 'get']) @@ -1071,16 +1072,15 @@ def main(): client0 = remote.Remote(user + host) ctx = config ctx.cluster=cluster.Cluster(remotes=[(client0, - [ 'ceph.client.rgw.%s' % (host), ]),]) - + [ 'ceph.client.rgw.%s' % (host), ]),]) ctx.rgw = argparse.Namespace() endpoints = {} endpoints['ceph.client.rgw.%s' % host] = (host, 80) ctx.rgw.role_endpoints = endpoints ctx.rgw.realm = None ctx.rgw.regions = {'region0': { 'api name': 'api1', - 'is master': True, 'master zone': 'r0z0', - 'zones': ['r0z0', 'r0z1'] }} + 'is master': True, 'master zone': 'r0z0', + 'zones': ['r0z0', 'r0z1'] }} ctx.rgw.config = {'ceph.client.rgw.%s' % host: {'system user': {'name': '%s-system-user' % host}}} task(config, None) exit() diff --git a/qa/tasks/ragweed.py b/qa/tasks/ragweed.py index cc63ce74247..32d108ceb64 100644 --- a/qa/tasks/ragweed.py +++ b/qa/tasks/ragweed.py @@ -1,7 +1,7 @@ """ Run a set of s3 tests on rgw. """ -from cStringIO import StringIO +from io import BytesIO from configobj import ConfigObj import base64 import contextlib @@ -155,7 +155,7 @@ def create_users(ctx, config, run_stages): if not 'check' in run_stages[client]: # only remove user if went through the check stage continue - for user in users.itervalues(): + for user in users.values(): uid = '{user}.{client}'.format(user=user, client=client) ctx.cluster.only(client).run( args=[ @@ -200,7 +200,7 @@ def configure(ctx, config, run_stages): if properties is not None and 'slow_backend' in properties: ragweed_conf['fixtures']['slow backend'] = properties['slow_backend'] - conf_fp = StringIO() + conf_fp = BytesIO() ragweed_conf.write(conf_fp) teuthology.write_file( remote=remote, diff --git a/qa/tasks/rbd.py b/qa/tasks/rbd.py index faa094dabeb..c690dcfe582 100644 --- a/qa/tasks/rbd.py +++ b/qa/tasks/rbd.py @@ -7,7 +7,7 @@ import os import tempfile import sys -from cStringIO import StringIO +from io import BytesIO from teuthology.orchestra import run from teuthology import misc as teuthology from teuthology import contextutil @@ -303,12 +303,12 @@ def canonical_path(ctx, role, path): representing the given role. A canonical path contains no . or .. components, and includes no symbolic links. """ - version_fp = StringIO() + version_fp = BytesIO() ctx.cluster.only(role).run( args=[ 'readlink', '-f', path ], stdout=version_fp, ) - canonical_path = version_fp.getvalue().rstrip('\n') + canonical_path = six.ensure_str(version_fp.getvalue()).rstrip('\n') version_fp.close() return canonical_path diff --git a/qa/tasks/rbd_fio.py b/qa/tasks/rbd_fio.py index 791cfd00af1..fb3c1b5c116 100644 --- a/qa/tasks/rbd_fio.py +++ b/qa/tasks/rbd_fio.py @@ -9,7 +9,6 @@ import contextlib import json import logging import os -import StringIO from teuthology.parallel import parallel from teuthology import misc as teuthology @@ -77,10 +76,8 @@ def get_ioengine_package_name(ioengine, remote): def run_rbd_map(remote, image, iodepth): iodepth = max(iodepth, 128) # RBD_QUEUE_DEPTH_DEFAULT - out = StringIO.StringIO() - remote.run(args=['sudo', 'rbd', 'device', 'map', '-o', - 'queue_depth={}'.format(iodepth), image], stdout=out) - dev = out.getvalue().rstrip('\n') + dev = remote.sh(['sudo', 'rbd', 'device', 'map', '-o', + 'queue_depth={}'.format(iodepth), image]).rstripg('\n') teuthology.sudo_write_file( remote, '/sys/block/{}/queue/nr_requests'.format(os.path.basename(dev)), @@ -214,9 +211,8 @@ def run_fio(remote, config, rbd_test_dir): remote.run(args=['sudo', run.Raw('{tdir}/fio-fio-{v}/fio {f}'.format(tdir=rbd_test_dir,v=fio_version,f=fio_config.name))]) remote.run(args=['ceph', '-s']) finally: - out=StringIO.StringIO() - remote.run(args=['rbd', 'device', 'list', '--format=json'], stdout=out) - mapped_images = json.loads(out.getvalue()) + out = remote.sh('rbd device list --format=json') + mapped_images = json.loads(out) if mapped_images: log.info("Unmapping rbd images on {sn}".format(sn=sn)) for image in mapped_images: diff --git a/qa/tasks/rgw.py b/qa/tasks/rgw.py index df900d2c450..199aa63f811 100644 --- a/qa/tasks/rgw.py +++ b/qa/tasks/rgw.py @@ -9,11 +9,11 @@ from teuthology.orchestra import run from teuthology import misc as teuthology from teuthology import contextutil from teuthology.exceptions import ConfigError -from util import get_remote_for_role -from util.rgw import rgwadmin, wait_for_radosgw -from util.rados import (create_ec_pool, - create_replicated_pool, - create_cache_pool) +from tasks.util import get_remote_for_role +from tasks.util.rgw import rgwadmin, wait_for_radosgw +from tasks.util.rados import (create_ec_pool, + create_replicated_pool, + create_cache_pool) log = logging.getLogger(__name__) diff --git a/qa/tasks/rgw_logsocket.py b/qa/tasks/rgw_logsocket.py index db6bbcb2ee0..86d7a19d34b 100644 --- a/qa/tasks/rgw_logsocket.py +++ b/qa/tasks/rgw_logsocket.py @@ -1,7 +1,7 @@ """ rgw s3tests logging wrappers """ -from cStringIO import StringIO +from io import BytesIO from configobj import ConfigObj import contextlib import logging @@ -68,7 +68,7 @@ def run_tests(ctx, config): s3tests.run_tests(ctx, config) - netcat_out = StringIO() + netcat_out = BytesIO() for client, client_config in config.items(): ctx.cluster.only(client).run( diff --git a/qa/tasks/s3tests.py b/qa/tasks/s3tests.py index 5adb6fd5bcb..c0266b6d2f6 100644 --- a/qa/tasks/s3tests.py +++ b/qa/tasks/s3tests.py @@ -1,13 +1,14 @@ """ Run a set of s3 tests on rgw. """ -from cStringIO import StringIO +from io import BytesIO from configobj import ConfigObj import base64 import contextlib import logging import os import random +import six import string from teuthology import misc as teuthology @@ -78,10 +79,14 @@ def _config_user(s3tests_conf, section, user): s3tests_conf[section].setdefault('user_id', user) s3tests_conf[section].setdefault('email', '{user}+test@test.test'.format(user=user)) s3tests_conf[section].setdefault('display_name', 'Mr. {user}'.format(user=user)) - s3tests_conf[section].setdefault('access_key', ''.join(random.choice(string.uppercase) for i in range(20))) - s3tests_conf[section].setdefault('secret_key', base64.b64encode(os.urandom(40))) - s3tests_conf[section].setdefault('totp_serial', ''.join(random.choice(string.digits) for i in range(10))) - s3tests_conf[section].setdefault('totp_seed', base64.b32encode(os.urandom(40))) + s3tests_conf[section].setdefault('access_key', + ''.join(random.choice(string.ascii_uppercase) for i in range(20))) + s3tests_conf[section].setdefault('secret_key', + six.ensure_str(base64.b64encode(os.urandom(40)))) + s3tests_conf[section].setdefault('totp_serial', + ''.join(random.choice(string.digits) for i in range(10))) + s3tests_conf[section].setdefault('totp_seed', + six.ensure_str(base64.b32encode(os.urandom(40)))) s3tests_conf[section].setdefault('totp_seconds', '5') @@ -141,7 +146,7 @@ def create_users(ctx, config): yield finally: for client in config['clients']: - for user in users.itervalues(): + for user in users.values(): uid = '{user}.{client}'.format(user=user, client=client) cluster_name, daemon_type, client_id = teuthology.split_role(client) client_with_id = daemon_type + '.' + client_id @@ -229,7 +234,7 @@ def configure(ctx, config): './bootstrap', ], ) - conf_fp = StringIO() + conf_fp = BytesIO() s3tests_conf.write(conf_fp) teuthology.write_file( remote=remote, @@ -242,13 +247,13 @@ def configure(ctx, config): for client, properties in config['clients'].items(): with open(boto_src, 'rb') as f: (remote,) = ctx.cluster.only(client).remotes.keys() - conf = f.read().format( + conf = six.ensure_str(f.read()).format( idle_timeout=config.get('idle_timeout', 30) ) teuthology.write_file( remote=remote, path='{tdir}/boto.cfg'.format(tdir=testdir), - data=conf, + data=six.ensure_binary(conf), ) try: diff --git a/qa/tasks/s3tests_java.py b/qa/tasks/s3tests_java.py index 5ccf46e8a43..bb09cc0fb66 100644 --- a/qa/tasks/s3tests_java.py +++ b/qa/tasks/s3tests_java.py @@ -1,7 +1,7 @@ """ Task for running RGW S3 tests with the AWS Java SDK """ -from cStringIO import StringIO +from io import BytesIO import logging import base64 @@ -117,7 +117,7 @@ class S3tests_java(Task): repo, '{tdir}/s3-tests-java'.format(tdir=testdir), ], - stdout=StringIO() + stdout=BytesIO() ) if client in self.config and self.config[client] is not None: if 'sha1' in self.config[client] and self.config[client]['sha1'] is not None: @@ -156,7 +156,7 @@ class S3tests_java(Task): testdir = teuthology.get_testdir(self.ctx) self.ctx.cluster.only(client).run( args=['{tdir}/s3-tests-java/bootstrap.sh'.format(tdir=testdir)], - stdout=StringIO() + stdout=BytesIO() ) endpoint = self.ctx.rgw.role_endpoints[client] @@ -173,7 +173,7 @@ class S3tests_java(Task): '-file', endpoint.cert.certificate, '-storepass', 'changeit', ], - stdout=StringIO() + stdout=BytesIO() ) def create_users(self): @@ -224,7 +224,7 @@ class S3tests_java(Task): log.info('{args}'.format(args=args)) self.ctx.cluster.only(client).run( args=args, - stdout=StringIO() + stdout=BytesIO() ) else: self.users.pop(section) @@ -279,8 +279,8 @@ class S3tests_java(Task): with open('s3_tests_tmp.yaml', 'w') as outfile: yaml.dump(cfg_dict, outfile, default_flow_style=False) - conf_fp = StringIO() - with open('s3_tests_tmp.yaml', 'r') as infile: + conf_fp = BytesIO() + with open('s3_tests_tmp.yaml', 'rb') as infile: for line in infile: conf_fp.write(line) @@ -309,7 +309,7 @@ class S3tests_java(Task): '{tdir}/s3-tests-java/config.properties'.format( tdir=testdir) ], - stdout=StringIO() + stdout=BytesIO() ) args = ['cd', '{tdir}/s3-tests-java'.format(tdir=testdir), @@ -346,25 +346,25 @@ class S3tests_java(Task): self.ctx.cluster.only(client).run( args=['radosgw-admin', 'gc', 'process', '--include-all'], - stdout=StringIO() + stdout=BytesIO() ) if gr != 'All': self.ctx.cluster.only(client).run( args=args + ['--tests'] + [gr] + extra_args, - stdout=StringIO() + stdout=BytesIO() ) else: self.ctx.cluster.only(client).run( args=args + extra_args, - stdout=StringIO() + stdout=BytesIO() ) for i in range(2): self.ctx.cluster.only(client).run( args=['radosgw-admin', 'gc', 'process', '--include-all'], - stdout=StringIO() + stdout=BytesIO() ) def remove_tests(self, client): @@ -379,7 +379,7 @@ class S3tests_java(Task): 'cat', self.log_name, run.Raw('&&'), 'rm', self.log_name], - stdout=StringIO() + stdout=BytesIO() ) self.ctx.cluster.only(client).run( @@ -388,7 +388,7 @@ class S3tests_java(Task): '-rf', '{tdir}/s3-tests-java'.format(tdir=testdir), ], - stdout=StringIO() + stdout=BytesIO() ) def delete_users(self, client): @@ -408,7 +408,7 @@ class S3tests_java(Task): '--purge-data', '--cluster', 'ceph', ], - stdout=StringIO() + stdout=BytesIO() ) diff --git a/qa/tasks/util/rgw.py b/qa/tasks/util/rgw.py index 91652198b8a..06ab47b5a98 100644 --- a/qa/tasks/util/rgw.py +++ b/qa/tasks/util/rgw.py @@ -1,4 +1,4 @@ -from cStringIO import StringIO +from io import BytesIO import logging import json import time @@ -7,7 +7,7 @@ from teuthology import misc as teuthology log = logging.getLogger(__name__) -def rgwadmin(ctx, client, cmd, stdin=StringIO(), check_status=False, +def rgwadmin(ctx, client, cmd, stdin=BytesIO(), check_status=False, format='json', decode=True, log_level=logging.DEBUG): log.info('rgwadmin: {client} : {cmd}'.format(client=client,cmd=cmd)) testdir = teuthology.get_testdir(ctx) @@ -29,8 +29,8 @@ def rgwadmin(ctx, client, cmd, stdin=StringIO(), check_status=False, proc = remote.run( args=pre, check_status=check_status, - stdout=StringIO(), - stderr=StringIO(), + stdout=BytesIO(), + stderr=BytesIO(), stdin=stdin, ) r = proc.exitstatus @@ -81,9 +81,9 @@ def wait_for_radosgw(url, remote): proc = remote.run( args=curl_cmd, check_status=False, - stdout=StringIO(), - stderr=StringIO(), - stdin=StringIO(), + stdout=BytesIO(), + stderr=BytesIO(), + stdin=BytesIO(), ) exit_status = proc.exitstatus if exit_status == 0: diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index 8d48152afd6..7055ebb7c9d 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -1408,11 +1408,11 @@ def exec_test(): mount = LocalFuseMount(ctx, test_dir, client_id) mounts.append(mount) - if mount.is_mounted(): - log.warn("unmounting {0}".format(mount.mountpoint)) - mount.umount_wait() - else: - if os.path.exists(mount.mountpoint): + if os.path.exists(mount.mountpoint): + if mount.is_mounted(): + log.warn("unmounting {0}".format(mount.mountpoint)) + mount.umount_wait() + else: os.rmdir(mount.mountpoint) from tasks.cephfs_test_runner import DecoratingLoader diff --git a/qa/workunits/ceph-helpers-root.sh b/qa/workunits/ceph-helpers-root.sh index 934380e5c47..c8fa4a3fe41 100755 --- a/qa/workunits/ceph-helpers-root.sh +++ b/qa/workunits/ceph-helpers-root.sh @@ -108,7 +108,7 @@ function pool_read_write() { ceph osd pool delete $test_pool $test_pool --yes-i-really-really-mean-it || return 1 ceph osd pool create $test_pool 4 || return 1 - ceph osd pool set $test_pool size $size || return 1 + ceph osd pool set $test_pool size $size --yes-i-really-mean-it || return 1 ceph osd pool set $test_pool min_size $size || return 1 ceph osd pool application enable $test_pool rados diff --git a/qa/workunits/cephadm/test_cephadm.sh b/qa/workunits/cephadm/test_cephadm.sh index b6c6cad306c..af09b250556 100755 --- a/qa/workunits/cephadm/test_cephadm.sh +++ b/qa/workunits/cephadm/test_cephadm.sh @@ -231,15 +231,18 @@ $CEPHADM ls | jq '.[]' | jq 'select(.name == "mon.a").version' | grep -q \\. ## deploy # add mon.b cp $CONFIG $MONCONFIG -echo "public addr = $IP:3301" >> $MONCONFIG +echo "public addrv = [v2:$IP:3301,v1:$IP:6790]" >> $MONCONFIG $CEPHADM deploy --name mon.b \ --fsid $FSID \ --keyring /var/lib/ceph/$FSID/mon.a/keyring \ - --config $CONFIG + --config $MONCONFIG for u in ceph-$FSID@mon.b; do systemctl is-enabled $u systemctl is-active $u done +cond="$CEPHADM shell --fsid $FSID --config $CONFIG --keyring $KEYRING -- \ + ceph mon stat | grep '2 mons'" +is_available "mon.b" "$cond" 30 # add mgr.y $CEPHADM shell --fsid $FSID --config $CONFIG --keyring $KEYRING -- \ @@ -273,11 +276,33 @@ loop_dev=$($SUDO losetup -f) $SUDO vgremove -f $OSD_VG_NAME || true $SUDO losetup $loop_dev $TMPDIR/$OSD_IMAGE_NAME $SUDO pvcreate $loop_dev && $SUDO vgcreate $OSD_VG_NAME $loop_dev + +# osd boostrap keyring +$CEPHADM shell --fsid $FSID --config $CONFIG --keyring $KEYRING -- \ + ceph auth get client.bootstrap-osd > $TMPDIR/keyring.bootstrap.osd + for id in `seq 0 $((--OSD_TO_CREATE))`; do $SUDO lvcreate -l $((100/$OSD_TO_CREATE))%VG -n $OSD_LV_NAME.$id $OSD_VG_NAME - $CEPHADM shell --fsid $FSID --config $CONFIG --keyring $KEYRING -- \ - ceph orch daemon add osd \ - $(hostname):/dev/$OSD_VG_NAME/$OSD_LV_NAME.$id + device_name=/dev/$OSD_VG_NAME/$OSD_LV_NAME.$id + + # prepare the osd + $CEPHADM ceph-volume --config $CONFIG --keyring $TMPDIR/keyring.bootstrap.osd -- \ + lvm prepare --bluestore --data $device_name --no-systemd + $CEPHADM ceph-volume --config $CONFIG --keyring $TMPDIR/keyring.bootstrap.osd -- \ + lvm batch --no-auto $device_name --yes --no-systemd + + # osd id and osd fsid + $CEPHADM ceph-volume --config $CONFIG --keyring $TMPDIR/keyring.bootstrap.osd -- \ + lvm list --format json $device_name > $TMPDIR/osd.map + osd_id=$($SUDO cat $TMPDIR/osd.map | jq -cr '.. | ."ceph.osd_id"? | select(.)') + osd_fsid=$($SUDO cat $TMPDIR/osd.map | jq -cr '.. | ."ceph.osd_fsid"? | select(.)') + + # deploy the osd + $CEPHADM deploy --name osd.$osd_id \ + --fsid $FSID \ + --keyring $TMPDIR/keyring.bootstrap.osd \ + --config $CONFIG \ + --osd-fsid $osd_fsid done # add node-exporter diff --git a/qa/workunits/cephtool/test.sh b/qa/workunits/cephtool/test.sh index 51d8bd7c7bc..16d8fa551e4 100755 --- a/qa/workunits/cephtool/test.sh +++ b/qa/workunits/cephtool/test.sh @@ -2174,9 +2174,9 @@ function test_mon_osd_pool_set() old_size=$(ceph osd pool get $TEST_POOL_GETSET size | sed -e 's/size: //') (( new_size = old_size + 1 )) - ceph osd pool set $TEST_POOL_GETSET size $new_size + ceph osd pool set $TEST_POOL_GETSET size $new_size --yes-i-really-mean-it ceph osd pool get $TEST_POOL_GETSET size | grep "size: $new_size" - ceph osd pool set $TEST_POOL_GETSET size $old_size + ceph osd pool set $TEST_POOL_GETSET size $old_size --yes-i-really-mean-it ceph osd pool create pool_erasure 1 1 erasure ceph osd pool application enable pool_erasure rados diff --git a/qa/workunits/mon/pool_ops.sh b/qa/workunits/mon/pool_ops.sh index 4098795b989..198a65869c7 100755 --- a/qa/workunits/mon/pool_ops.sh +++ b/qa/workunits/mon/pool_ops.sh @@ -19,7 +19,7 @@ ceph osd pool create foooo 123 ceph osd pool create foo 123 # idempotent -ceph osd pool set foo size 1 +ceph osd pool set foo size 1 --yes-i-really-mean-it ceph osd pool set foo size 4 ceph osd pool set foo size 10 expect_false ceph osd pool set foo size 0 diff --git a/qa/workunits/rados/test_alloc_hint.sh b/qa/workunits/rados/test_alloc_hint.sh index 2323915fce7..535201ca3c4 100755 --- a/qa/workunits/rados/test_alloc_hint.sh +++ b/qa/workunits/rados/test_alloc_hint.sh @@ -109,7 +109,7 @@ setup_osd_data POOL="alloc_hint-rep" ceph osd pool create "${POOL}" "${NUM_PG}" -ceph osd pool set "${POOL}" size "${NUM_OSDS}" +ceph osd pool set "${POOL}" size "${NUM_OSDS}" --yes-i-really-mean-it ceph osd pool application enable "${POOL}" rados OBJ="foo" diff --git a/qa/workunits/rados/test_rados_tool.sh b/qa/workunits/rados/test_rados_tool.sh index 5325743f23d..9d025eee8ae 100755 --- a/qa/workunits/rados/test_rados_tool.sh +++ b/qa/workunits/rados/test_rados_tool.sh @@ -85,7 +85,7 @@ TDIR=`mktemp -d -t test_rados_tool.XXXXXXXXXX` || die "mktemp failed" # ensure rados doesn't segfault without --pool run_expect_nosignal "$RADOS_TOOL" --snap "asdf" ls run_expect_nosignal "$RADOS_TOOL" --snapid "0" ls -run_expect_nosignal "$RADOS_TOOL" --object_locator "asdf" ls +run_expect_nosignal "$RADOS_TOOL" --object-locator "asdf" ls run_expect_nosignal "$RADOS_TOOL" --namespace "asdf" ls run_expect_succ "$CEPH_TOOL" osd pool create "$POOL" 8 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5f370b8dbbb..7ae4f162af8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -144,7 +144,6 @@ if(HAVE_INTEL) endif() endif() - # require c++17 set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/src/auth/AuthClientHandler.cc b/src/auth/AuthClientHandler.cc index 6d86c4e8e92..5e6521dfdec 100644 --- a/src/auth/AuthClientHandler.cc +++ b/src/auth/AuthClientHandler.cc @@ -40,4 +40,3 @@ AuthClientHandler::create(CephContext* cct, int proto, return NULL; } } - diff --git a/src/auth/AuthMethodList.cc b/src/auth/AuthMethodList.cc index 429833309a0..6efcea4e9c9 100644 --- a/src/auth/AuthMethodList.cc +++ b/src/auth/AuthMethodList.cc @@ -28,7 +28,7 @@ AuthMethodList::AuthMethodList(CephContext *cct, std::string str) if (sup_list.empty()) { lderr(cct) << "WARNING: empty auth protocol list" << dendl; } - for (list<string>::iterator iter = sup_list.begin(); iter != sup_list.end(); ++iter) { + for (auto iter = sup_list.begin(); iter != sup_list.end(); ++iter) { ldout(cct, 5) << "adding auth protocol: " << *iter << dendl; if (iter->compare("cephx") == 0) { auth_supported.push_back(CEPH_AUTH_CEPHX); @@ -54,7 +54,7 @@ bool AuthMethodList::is_supported_auth(int auth_type) int AuthMethodList::pick(const std::set<__u32>& supported) { - for (set<__u32>::const_reverse_iterator p = supported.rbegin(); p != supported.rend(); ++p) + for (auto p = supported.rbegin(); p != supported.rend(); ++p) if (is_supported_auth(*p)) return *p; return CEPH_AUTH_UNKNOWN; @@ -62,7 +62,7 @@ int AuthMethodList::pick(const std::set<__u32>& supported) void AuthMethodList::remove_supported_auth(int auth_type) { - for (list<__u32>::iterator p = auth_supported.begin(); p != auth_supported.end(); ) { + for (auto p = auth_supported.begin(); p != auth_supported.end(); ) { if (*p == (__u32)auth_type) auth_supported.erase(p++); else diff --git a/src/auth/AuthRegistry.cc b/src/auth/AuthRegistry.cc index 897aa81f089..0043567fb8d 100644 --- a/src/auth/AuthRegistry.cc +++ b/src/auth/AuthRegistry.cc @@ -16,6 +16,8 @@ #undef dout_prefix #define dout_prefix *_dout << "AuthRegistry(" << this << ") " +using std::string; + AuthRegistry::AuthRegistry(CephContext *cct) : cct(cct) { diff --git a/src/auth/Crypto.cc b/src/auth/Crypto.cc index e45946341ac..1827b5a7de8 100644 --- a/src/auth/Crypto.cc +++ b/src/auth/Crypto.cc @@ -39,6 +39,13 @@ #include <unistd.h> +using std::ostringstream; +using std::string; + +using ceph::bufferlist; +using ceph::bufferptr; +using ceph::Formatter; + static bool getentropy_works() { char buf; @@ -476,7 +483,7 @@ void CryptoKey::decode(bufferlist::const_iterator& bl) bufferptr tmp; bl.copy_deep(len, tmp); if (_set_secret(type, tmp) < 0) - throw buffer::malformed_input("malformed secret"); + throw ceph::buffer::malformed_input("malformed secret"); } int CryptoKey::set_secret(int type, const bufferptr& s, utime_t c) diff --git a/src/auth/KeyRing.cc b/src/auth/KeyRing.cc index a2833183633..2ddc0b4ab22 100644 --- a/src/auth/KeyRing.cc +++ b/src/auth/KeyRing.cc @@ -30,6 +30,14 @@ #undef dout_prefix #define dout_prefix *_dout << "auth: " +using std::map; +using std::ostream; +using std::ostringstream; +using std::string; + +using ceph::bufferlist; +using ceph::Formatter; + int KeyRing::from_ceph_context(CephContext *cct) { const auto& conf = cct->_conf; @@ -53,7 +61,7 @@ int KeyRing::from_ceph_context(CephContext *cct) add(conf->name, ea); return 0; } - catch (buffer::error& e) { + catch (ceph::buffer::error& e) { lderr(cct) << "failed to decode key '" << conf->key << "'" << dendl; return -EINVAL; } @@ -73,7 +81,7 @@ int KeyRing::from_ceph_context(CephContext *cct) ea.key.decode_base64(k); add(conf->name, ea); } - catch (buffer::error& e) { + catch (ceph::buffer::error& e) { lderr(cct) << "failed to decode key '" << k << "'" << dendl; return -EINVAL; } @@ -96,7 +104,7 @@ int KeyRing::set_modifier(const char *type, string l(val); try { key.decode_base64(l); - } catch (const buffer::error& err) { + } catch (const ceph::buffer::error& err) { return -EINVAL; } set_key(name, key); @@ -162,7 +170,7 @@ void KeyRing::decode_plaintext(bufferlist::const_iterator& bli) ConfFile cf; if (cf.parse_bufferlist(&bl, nullptr) != 0) { - throw buffer::malformed_input("cannot parse buffer"); + throw ceph::buffer::malformed_input("cannot parse buffer"); } for (auto& [name, section] : cf) { @@ -174,7 +182,7 @@ void KeyRing::decode_plaintext(bufferlist::const_iterator& bli) if (!ename.from_str(name)) { ostringstream oss; oss << "bad entity name in keyring: " << name; - throw buffer::malformed_input(oss.str().c_str()); + throw ceph::buffer::malformed_input(oss.str().c_str()); } for (auto& [k, val] : section) { @@ -187,7 +195,7 @@ void KeyRing::decode_plaintext(bufferlist::const_iterator& bli) ostringstream oss; oss << "error setting modifier for [" << name << "] type=" << key << " val=" << val; - throw buffer::malformed_input(oss.str().c_str()); + throw ceph::buffer::malformed_input(oss.str().c_str()); } } } @@ -200,7 +208,7 @@ void KeyRing::decode(bufferlist::const_iterator& bl) { using ceph::decode; decode(struct_v, bl); decode(keys, bl); - } catch (buffer::error& err) { + } catch (ceph::buffer::error& err) { keys.clear(); decode_plaintext(start_pos); } @@ -223,7 +231,7 @@ int KeyRing::load(CephContext *cct, const std::string &filename) auto iter = bl.cbegin(); decode(iter); } - catch (const buffer::error& err) { + catch (const ceph::buffer::error& err) { lderr(cct) << "error parsing file " << filename << ": " << err.what() << dendl; return -EIO; } diff --git a/src/auth/RotatingKeyRing.cc b/src/auth/RotatingKeyRing.cc index c2d614a1432..4bc6af6adca 100644 --- a/src/auth/RotatingKeyRing.cc +++ b/src/auth/RotatingKeyRing.cc @@ -31,7 +31,7 @@ void RotatingKeyRing::set_secrets(RotatingSecrets&& s) void RotatingKeyRing::dump_rotating() const { ldout(cct, 10) << "dump_rotating:" << dendl; - for (map<uint64_t, ExpiringCryptoKey>::const_iterator iter = secrets.secrets.begin(); + for (auto iter = secrets.secrets.begin(); iter != secrets.secrets.end(); ++iter) ldout(cct, 10) << " id " << iter->first << " " << iter->second << dendl; @@ -54,8 +54,7 @@ bool RotatingKeyRing::get_service_secret(uint32_t service_id_, uint64_t secret_i return false; } - map<uint64_t, ExpiringCryptoKey>::const_iterator iter = - secrets.secrets.find(secret_id); + auto iter = secrets.secrets.find(secret_id); if (iter == secrets.secrets.end()) { ldout(cct, 0) << "could not find secret_id=" << secret_id << dendl; dump_rotating(); diff --git a/src/auth/cephx/CephxAuthorizeHandler.cc b/src/auth/cephx/CephxAuthorizeHandler.cc index b07de5a1d96..615b8750081 100644 --- a/src/auth/cephx/CephxAuthorizeHandler.cc +++ b/src/auth/cephx/CephxAuthorizeHandler.cc @@ -4,14 +4,12 @@ #define dout_subsys ceph_subsys_auth - - bool CephxAuthorizeHandler::verify_authorizer( CephContext *cct, const KeyStore& keys, - const bufferlist& authorizer_data, + const ceph::bufferlist& authorizer_data, size_t connection_secret_required_len, - bufferlist *authorizer_reply, + ceph::bufferlist *authorizer_reply, EntityName *entity_name, uint64_t *global_id, AuthCapsInfo *caps_info, diff --git a/src/auth/cephx/CephxAuthorizeHandler.h b/src/auth/cephx/CephxAuthorizeHandler.h index b72b7c5e9cc..62611907837 100644 --- a/src/auth/cephx/CephxAuthorizeHandler.h +++ b/src/auth/cephx/CephxAuthorizeHandler.h @@ -22,9 +22,9 @@ struct CephxAuthorizeHandler : public AuthAuthorizeHandler { bool verify_authorizer( CephContext *cct, const KeyStore& keys, - const bufferlist& authorizer_data, + const ceph::buffer::list& authorizer_data, size_t connection_secret_required_len, - bufferlist *authorizer_reply, + ceph::buffer::list *authorizer_reply, EntityName *entity_name, uint64_t *global_id, AuthCapsInfo *caps_info, diff --git a/src/auth/cephx/CephxClientHandler.cc b/src/auth/cephx/CephxClientHandler.cc index a5365d344d1..412142ba53f 100644 --- a/src/auth/cephx/CephxClientHandler.cc +++ b/src/auth/cephx/CephxClientHandler.cc @@ -28,6 +28,10 @@ #undef dout_prefix #define dout_prefix *_dout << "cephx client: " +using std::string; + +using ceph::bufferlist; + void CephxClientHandler::reset() { ldout(cct,10) << __func__ << dendl; @@ -130,7 +134,7 @@ int CephxClientHandler::handle_response( CephXServerChallenge ch; try { decode(ch, indata); - } catch (buffer::error& e) { + } catch (ceph::buffer::error& e) { ldout(cct, 1) << __func__ << " failed to decode CephXServerChallenge: " << e.what() << dendl; return -EPERM; @@ -147,7 +151,7 @@ int CephxClientHandler::handle_response( struct CephXResponseHeader header; try { decode(header, indata); - } catch (buffer::error& e) { + } catch (ceph::buffer::error& e) { ldout(cct, 1) << __func__ << " failed to decode CephXResponseHeader: " << e.what() << dendl; return -EPERM; @@ -171,10 +175,11 @@ int CephxClientHandler::handle_response( ldout(cct, 10) << " want=" << want << " need=" << need << " have=" << have << dendl; if (!indata.end()) { bufferlist cbl, extra_tickets; + using ceph::decode; try { decode(cbl, indata); decode(extra_tickets, indata); - } catch (buffer::error& e) { + } catch (ceph::buffer::error& e) { ldout(cct, 1) << __func__ << " failed to decode tickets: " << e.what() << dendl; return -EPERM; diff --git a/src/auth/cephx/CephxClientHandler.h b/src/auth/cephx/CephxClientHandler.h index 6b225e4aca3..95a7e566428 100644 --- a/src/auth/cephx/CephxClientHandler.h +++ b/src/auth/cephx/CephxClientHandler.h @@ -50,11 +50,11 @@ public: void reset() override; void prepare_build_request() override; - int build_request(bufferlist& bl) const override; - int handle_response(int ret, bufferlist::const_iterator& iter, + int build_request(ceph::buffer::list& bl) const override; + int handle_response(int ret, ceph::buffer::list::const_iterator& iter, CryptoKey *session_key, std::string *connection_secret) override; - bool build_rotating_request(bufferlist& bl) const override; + bool build_rotating_request(ceph::buffer::list& bl) const override; int get_protocol() const override { return CEPH_AUTH_CEPHX; } diff --git a/src/auth/cephx/CephxProtocol.cc b/src/auth/cephx/CephxProtocol.cc index ef95b66aa1c..7f485b82295 100644 --- a/src/auth/cephx/CephxProtocol.cc +++ b/src/auth/cephx/CephxProtocol.cc @@ -23,7 +23,13 @@ #undef dout_prefix #define dout_prefix *_dout << "cephx: " +using std::dec; +using std::hex; +using std::vector; +using ceph::bufferlist; +using ceph::decode; +using ceph::encode; void cephx_calc_client_server_challenge(CephContext *cct, CryptoKey& secret, uint64_t server_challenge, uint64_t client_challenge, uint64_t *key, std::string &error) @@ -92,6 +98,7 @@ bool cephx_build_service_ticket_reply(CephContext *cct, bufferlist& reply) { __u8 service_ticket_reply_v = 1; + using ceph::encode; encode(service_ticket_reply_v, reply); uint32_t num = ticket_info_vec.size(); @@ -99,7 +106,7 @@ bool cephx_build_service_ticket_reply(CephContext *cct, ldout(cct, 10) << "build_service_ticket_reply encoding " << num << " tickets with secret " << principal_secret << dendl; - for (vector<CephXSessionAuthInfo>::iterator ticket_iter = ticket_info_vec.begin(); + for (auto ticket_iter = ticket_info_vec.begin(); ticket_iter != ticket_info_vec.end(); ++ticket_iter) { CephXSessionAuthInfo& info = *ticket_iter; @@ -149,6 +156,7 @@ bool CephXTicketHandler::verify_service_ticket_reply( CryptoKey& secret, bufferlist::const_iterator& indata) { + using ceph::decode; try { __u8 service_ticket_v; decode(service_ticket_v, indata); @@ -198,7 +206,7 @@ bool CephXTicketHandler::verify_service_ticket_reply( have_key_flag = true; return true; - } catch (buffer::error& e) { + } catch (ceph::buffer::error& e) { ldout(cct, 1) << __func__ << " decode error: " << e.what() << dendl; return false; } @@ -224,7 +232,7 @@ bool CephXTicketHandler::need_key() const bool CephXTicketManager::have_key(uint32_t service_id) { - map<uint32_t, CephXTicketHandler>::iterator iter = tickets_map.find(service_id); + auto iter = tickets_map.find(service_id); if (iter == tickets_map.end()) return false; return iter->second.have_key(); @@ -232,7 +240,7 @@ bool CephXTicketManager::have_key(uint32_t service_id) bool CephXTicketManager::need_key(uint32_t service_id) const { - map<uint32_t, CephXTicketHandler>::const_iterator iter = tickets_map.find(service_id); + auto iter = tickets_map.find(service_id); if (iter == tickets_map.end()) return true; return iter->second.need_key(); @@ -240,7 +248,7 @@ bool CephXTicketManager::need_key(uint32_t service_id) const void CephXTicketManager::set_have_need_key(uint32_t service_id, uint32_t& have, uint32_t& need) { - map<uint32_t, CephXTicketHandler>::iterator iter = tickets_map.find(service_id); + auto iter = tickets_map.find(service_id); if (iter == tickets_map.end()) { have &= ~service_id; need |= service_id; @@ -265,7 +273,7 @@ void CephXTicketManager::set_have_need_key(uint32_t service_id, uint32_t& have, void CephXTicketManager::invalidate_ticket(uint32_t service_id) { - map<uint32_t, CephXTicketHandler>::iterator iter = tickets_map.find(service_id); + auto iter = tickets_map.find(service_id); if (iter != tickets_map.end()) iter->second.invalidate_ticket(); } @@ -282,7 +290,7 @@ bool CephXTicketManager::verify_service_ticket_reply(CryptoKey& secret, try { decode(service_ticket_reply_v, indata); decode(num, indata); - } catch (buffer::error& e) { + } catch (ceph::buffer::error& e) { ldout(cct, 10) << __func__ << " failed to decode ticket v or count: " << e.what() << dendl; } @@ -292,7 +300,7 @@ bool CephXTicketManager::verify_service_ticket_reply(CryptoKey& secret, uint32_t type = 0; try { decode(type, indata); - } catch (buffer::error& e) { + } catch (ceph::buffer::error& e) { ldout(cct, 10) << __func__ << " failed to decode ticket type: " << e.what() << dendl; } @@ -345,7 +353,7 @@ CephXAuthorizer *CephXTicketHandler::build_authorizer(uint64_t global_id) const */ CephXAuthorizer *CephXTicketManager::build_authorizer(uint32_t service_id) const { - map<uint32_t, CephXTicketHandler>::const_iterator iter = tickets_map.find(service_id); + auto iter = tickets_map.find(service_id); if (iter == tickets_map.end()) { ldout(cct, 0) << "no TicketHandler for service " << ceph_entity_type_name(service_id) << dendl; @@ -429,7 +437,7 @@ bool cephx_verify_authorizer(CephContext *cct, const KeyStore& keys, decode(global_id, indata); decode(service_id, indata); decode(ticket, indata); - } catch (buffer::end_of_buffer &e) { + } catch (ceph::buffer::end_of_buffer &e) { // Unable to decode! return false; } diff --git a/src/auth/cephx/CephxProtocol.h b/src/auth/cephx/CephxProtocol.h index 6c2d53a0951..f5b87c15e66 100644 --- a/src/auth/cephx/CephxProtocol.h +++ b/src/auth/cephx/CephxProtocol.h @@ -43,13 +43,13 @@ struct CephXServerChallenge { uint64_t server_challenge; - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; __u8 struct_v = 1; encode(struct_v, bl); encode(server_challenge, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; __u8 struct_v; decode(struct_v, bl); @@ -64,11 +64,11 @@ WRITE_CLASS_ENCODER(CephXServerChallenge) struct CephXRequestHeader { __u16 request_type; - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; encode(request_type, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; decode(request_type, bl); } @@ -79,12 +79,12 @@ struct CephXResponseHeader { uint16_t request_type; int32_t status; - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; encode(request_type, bl); encode(status, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; decode(request_type, bl); decode(status, bl); @@ -94,11 +94,11 @@ WRITE_CLASS_ENCODER(CephXResponseHeader) struct CephXTicketBlob { uint64_t secret_id; - bufferlist blob; + ceph::buffer::list blob; CephXTicketBlob() : secret_id(0) {} - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; __u8 struct_v = 1; encode(struct_v, bl); @@ -106,7 +106,7 @@ struct CephXTicketBlob { encode(blob, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; __u8 struct_v; decode(struct_v, bl); @@ -123,7 +123,7 @@ struct CephXAuthenticate { CephXTicketBlob old_ticket; uint32_t other_keys = 0; // replaces CephXServiceTicketRequest - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; __u8 struct_v = 2; encode(struct_v, bl); @@ -132,7 +132,7 @@ struct CephXAuthenticate { encode(old_ticket, bl); encode(other_keys, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; __u8 struct_v; decode(struct_v, bl); @@ -149,12 +149,12 @@ WRITE_CLASS_ENCODER(CephXAuthenticate) struct CephXChallengeBlob { uint64_t server_challenge, client_challenge; - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; encode(server_challenge, bl); encode(client_challenge, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; decode(server_challenge, bl); decode(client_challenge, bl); @@ -185,25 +185,25 @@ extern bool cephx_build_service_ticket_blob(CephContext *cct, extern void cephx_build_service_ticket_request(CephContext *cct, uint32_t keys, - bufferlist& request); + ceph::buffer::list& request); extern bool cephx_build_service_ticket_reply(CephContext *cct, CryptoKey& principal_secret, - vector<CephXSessionAuthInfo> ticket_info, + std::vector<CephXSessionAuthInfo> ticket_info, bool should_encrypt_ticket, CryptoKey& ticket_enc_key, - bufferlist& reply); + ceph::buffer::list& reply); struct CephXServiceTicketRequest { uint32_t keys; - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; __u8 struct_v = 1; encode(struct_v, bl); encode(keys, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; __u8 struct_v; decode(struct_v, bl); @@ -220,7 +220,7 @@ WRITE_CLASS_ENCODER(CephXServiceTicketRequest) struct CephXAuthorizeReply { uint64_t nonce_plus_one; std::string connection_secret; - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; __u8 struct_v = 1; if (connection_secret.size()) { @@ -233,7 +233,7 @@ struct CephXAuthorizeReply { encode(connection_secret, bl); } } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; __u8 struct_v; decode(struct_v, bl); @@ -251,15 +251,15 @@ private: CephContext *cct; public: uint64_t nonce; - bufferlist base_bl; + ceph::buffer::list base_bl; explicit CephXAuthorizer(CephContext *cct_) : AuthAuthorizer(CEPH_AUTH_CEPHX), cct(cct_), nonce(0) {} bool build_authorizer(); - bool verify_reply(bufferlist::const_iterator& reply, + bool verify_reply(ceph::buffer::list::const_iterator& reply, std::string *connection_secret) override; - bool add_challenge(CephContext *cct, const bufferlist& challenge) override; + bool add_challenge(CephContext *cct, const ceph::buffer::list& challenge) override; }; @@ -279,7 +279,7 @@ struct CephXTicketHandler { // to build our ServiceTicket bool verify_service_ticket_reply(CryptoKey& principal_secret, - bufferlist::const_iterator& indata); + ceph::buffer::list::const_iterator& indata); // to access the service CephXAuthorizer *build_authorizer(uint64_t global_id) const; @@ -294,14 +294,14 @@ private: }; struct CephXTicketManager { - typedef map<uint32_t, CephXTicketHandler> tickets_map_t; + typedef std::map<uint32_t, CephXTicketHandler> tickets_map_t; tickets_map_t tickets_map; uint64_t global_id; explicit CephXTicketManager(CephContext *cct_) : global_id(0), cct(cct_) {} bool verify_service_ticket_reply(CryptoKey& principal_secret, - bufferlist::const_iterator& indata); + ceph::buffer::list::const_iterator& indata); CephXTicketHandler& get_handler(uint32_t type) { tickets_map_t::iterator i = tickets_map.find(type); @@ -330,14 +330,14 @@ struct CephXServiceTicket { CryptoKey session_key; utime_t validity; - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; __u8 struct_v = 1; encode(struct_v, bl); encode(session_key, bl); encode(validity, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; __u8 struct_v; decode(struct_v, bl); @@ -352,14 +352,14 @@ struct CephXServiceTicketInfo { AuthTicket ticket; CryptoKey session_key; - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; __u8 struct_v = 1; encode(struct_v, bl); encode(ticket, bl); encode(session_key, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; __u8 struct_v; decode(struct_v, bl); @@ -371,13 +371,13 @@ WRITE_CLASS_ENCODER(CephXServiceTicketInfo) struct CephXAuthorizeChallenge : public AuthAuthorizerChallenge { uint64_t server_challenge; - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; __u8 struct_v = 1; encode(struct_v, bl); encode(server_challenge, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; __u8 struct_v; decode(struct_v, bl); @@ -390,7 +390,7 @@ struct CephXAuthorize { uint64_t nonce; bool have_challenge = false; uint64_t server_challenge_plus_one = 0; - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; __u8 struct_v = 2; encode(struct_v, bl); @@ -398,7 +398,7 @@ struct CephXAuthorize { encode(have_challenge, bl); encode(server_challenge_plus_one, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; __u8 struct_v; decode(struct_v, bl); @@ -424,12 +424,12 @@ bool cephx_decode_ticket(CephContext *cct, KeyStore *keys, extern bool cephx_verify_authorizer( CephContext *cct, const KeyStore& keys, - bufferlist::const_iterator& indata, + ceph::buffer::list::const_iterator& indata, size_t connection_secret_required_len, CephXServiceTicketInfo& ticket_info, std::unique_ptr<AuthAuthorizerChallenge> *challenge, std::string *connection_secret, - bufferlist *reply_bl); + ceph::buffer::list *reply_bl); @@ -443,21 +443,22 @@ static constexpr uint64_t AUTH_ENC_MAGIC = 0xff009cad8826aa55ull; template <typename T> void decode_decrypt_enc_bl(CephContext *cct, T& t, CryptoKey key, - const bufferlist& bl_enc, + const ceph::buffer::list& bl_enc, std::string &error) { uint64_t magic; - bufferlist bl; + ceph::buffer::list bl; if (key.decrypt(cct, bl_enc, bl, &error) < 0) return; auto iter2 = bl.cbegin(); __u8 struct_v; + using ceph::decode; decode(struct_v, iter2); decode(magic, iter2); if (magic != AUTH_ENC_MAGIC) { - ostringstream oss; + std::ostringstream oss; oss << "bad magic in decode_decrypt, " << magic << " != " << AUTH_ENC_MAGIC; error = oss.str(); return; @@ -468,10 +469,11 @@ void decode_decrypt_enc_bl(CephContext *cct, T& t, CryptoKey key, template <typename T> void encode_encrypt_enc_bl(CephContext *cct, const T& t, const CryptoKey& key, - bufferlist& out, std::string &error) + ceph::buffer::list& out, std::string &error) { - bufferlist bl; + ceph::buffer::list bl; __u8 struct_v = 1; + using ceph::encode; encode(struct_v, bl); uint64_t magic = AUTH_ENC_MAGIC; encode(magic, bl); @@ -482,14 +484,15 @@ void encode_encrypt_enc_bl(CephContext *cct, const T& t, const CryptoKey& key, template <typename T> int decode_decrypt(CephContext *cct, T& t, const CryptoKey& key, - bufferlist::const_iterator& iter, std::string &error) + ceph::buffer::list::const_iterator& iter, std::string &error) { - bufferlist bl_enc; + ceph::buffer::list bl_enc; + using ceph::decode; try { decode(bl_enc, iter); decode_decrypt_enc_bl(cct, t, key, bl_enc, error); } - catch (buffer::error &e) { + catch (ceph::buffer::error &e) { error = "error decoding block for decryption"; } if (!error.empty()) @@ -499,9 +502,10 @@ int decode_decrypt(CephContext *cct, T& t, const CryptoKey& key, template <typename T> int encode_encrypt(CephContext *cct, const T& t, const CryptoKey& key, - bufferlist& out, std::string &error) + ceph::buffer::list& out, std::string &error) { - bufferlist bl_enc; + using ceph::encode; + ceph::buffer::list bl_enc; encode_encrypt_enc_bl(cct, t, key, bl_enc, error); if (!error.empty()){ return CEPHX_CRYPT_ERR; diff --git a/src/auth/none/AuthNoneAuthorizeHandler.cc b/src/auth/none/AuthNoneAuthorizeHandler.cc index 2b81212ce74..bc553fed6bb 100644 --- a/src/auth/none/AuthNoneAuthorizeHandler.cc +++ b/src/auth/none/AuthNoneAuthorizeHandler.cc @@ -20,9 +20,9 @@ bool AuthNoneAuthorizeHandler::verify_authorizer( CephContext *cct, const KeyStore& keys, - const bufferlist& authorizer_data, + const ceph::buffer::list& authorizer_data, size_t connection_secret_required_len, - bufferlist *authorizer_reply, + ceph::buffer::list *authorizer_reply, EntityName *entity_name, uint64_t *global_id, AuthCapsInfo *caps_info, @@ -30,6 +30,7 @@ bool AuthNoneAuthorizeHandler::verify_authorizer( std::string *connection_secret, std::unique_ptr<AuthAuthorizerChallenge> *challenge) { + using ceph::decode; auto iter = authorizer_data.cbegin(); try { @@ -37,7 +38,7 @@ bool AuthNoneAuthorizeHandler::verify_authorizer( decode(struct_v, iter); decode(*entity_name, iter); decode(*global_id, iter); - } catch (const buffer::error &err) { + } catch (const ceph::buffer::error &err) { ldout(cct, 0) << "AuthNoneAuthorizeHandle::verify_authorizer() failed to decode" << dendl; return false; } diff --git a/src/auth/none/AuthNoneAuthorizeHandler.h b/src/auth/none/AuthNoneAuthorizeHandler.h index 46586418980..3d5ca58d526 100644 --- a/src/auth/none/AuthNoneAuthorizeHandler.h +++ b/src/auth/none/AuthNoneAuthorizeHandler.h @@ -22,9 +22,9 @@ struct AuthNoneAuthorizeHandler : public AuthAuthorizeHandler { bool verify_authorizer( CephContext *cct, const KeyStore& keys, - const bufferlist& authorizer_data, + const ceph::buffer::list& authorizer_data, size_t connection_secret_required_len, - bufferlist *authorizer_reply, + ceph::buffer::list *authorizer_reply, EntityName *entity_name, uint64_t *global_id, AuthCapsInfo *caps_info, diff --git a/src/auth/none/AuthNoneClientHandler.h b/src/auth/none/AuthNoneClientHandler.h index eb3ef8f5521..740ef0fc20d 100644 --- a/src/auth/none/AuthNoneClientHandler.h +++ b/src/auth/none/AuthNoneClientHandler.h @@ -29,11 +29,11 @@ public: void reset() override { } void prepare_build_request() override {} - int build_request(bufferlist& bl) const override { return 0; } - int handle_response(int ret, bufferlist::const_iterator& iter, + int build_request(ceph::buffer::list& bl) const override { return 0; } + int handle_response(int ret, ceph::buffer::list::const_iterator& iter, CryptoKey *session_key, std::string *connection_secret) override { return 0; } - bool build_rotating_request(bufferlist& bl) const override { return false; } + bool build_rotating_request(ceph::buffer::list& bl) const override { return false; } int get_protocol() const override { return CEPH_AUTH_NONE; } diff --git a/src/auth/none/AuthNoneProtocol.h b/src/auth/none/AuthNoneProtocol.h index ea0b731f571..d23fdcc6723 100644 --- a/src/auth/none/AuthNoneProtocol.h +++ b/src/auth/none/AuthNoneProtocol.h @@ -22,14 +22,15 @@ struct AuthNoneAuthorizer : public AuthAuthorizer { AuthNoneAuthorizer() : AuthAuthorizer(CEPH_AUTH_NONE) { } bool build_authorizer(const EntityName &ename, uint64_t global_id) { __u8 struct_v = 1; // see AUTH_MODE_* in Auth.h + using ceph::encode; encode(struct_v, bl); encode(ename, bl); encode(global_id, bl); return 0; } - bool verify_reply(bufferlist::const_iterator& reply, + bool verify_reply(ceph::buffer::list::const_iterator& reply, std::string *connection_secret) override { return true; } - bool add_challenge(CephContext *cct, const bufferlist& ch) override { + bool add_challenge(CephContext *cct, const ceph::buffer::list& ch) override { return true; } }; diff --git a/src/ceph-volume/ceph_volume/api/lvm.py b/src/ceph-volume/ceph_volume/api/lvm.py index 30746805f65..14ecba3b84f 100644 --- a/src/ceph-volume/ceph_volume/api/lvm.py +++ b/src/ceph-volume/ceph_volume/api/lvm.py @@ -651,7 +651,7 @@ class VolumeGroup(object): ''' Return how many extents fit the VG slot times ''' - return int(int(self.vg_free_count) / slots) + return int(int(self.vg_extent_count) / slots) class VolumeGroups(list): diff --git a/src/ceph-volume/ceph_volume/devices/lvm/common.py b/src/ceph-volume/ceph_volume/devices/lvm/common.py index 06fc33541a3..6cd8c59b886 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/common.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/common.py @@ -66,6 +66,7 @@ def common_parser(prog, description): '--data-slots', help=('Intended number of slots on data device. The new OSD gets one' 'of those slots or 1/nth of the available capacity'), + type=int, default=1, ) @@ -110,6 +111,7 @@ def common_parser(prog, description): dest='block_db_slots', help=('Intended number of slots on db device. The new OSD gets one' 'of those slots or 1/nth of the available capacity'), + type=int, default=1, ) @@ -131,6 +133,7 @@ def common_parser(prog, description): dest='block_wal_slots', help=('Intended number of slots on wal device. The new OSD gets one' 'of those slots or 1/nth of the available capacity'), + type=int, default=1, ) diff --git a/src/ceph-volume/ceph_volume/devices/lvm/prepare.py b/src/ceph-volume/ceph_volume/devices/lvm/prepare.py index c602a705fb9..44401094174 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/prepare.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/prepare.py @@ -178,6 +178,9 @@ class Prepare(object): kwargs = { 'device': device_name, 'tags': tags, + 'slots': getattr(self.args, + 'block_{}_slots'.format(device_type), + 1), } if size != 0: kwargs['size'] = disk.Size.parse(size) @@ -213,6 +216,7 @@ class Prepare(object): lv_name_prefix = "osd-{}".format(device_type) kwargs = {'device': device, 'tags': {'ceph.type': device_type}, + 'slots': self.args.data_slots, } logger.debug('data device size: {}'.format(self.args.data_size)) if self.args.data_size != 0: diff --git a/src/ceph-volume/ceph_volume/tests/api/test_lvm.py b/src/ceph-volume/ceph_volume/tests/api/test_lvm.py index 8525965a374..4270a43b1ea 100644 --- a/src/ceph-volume/ceph_volume/tests/api/test_lvm.py +++ b/src/ceph-volume/ceph_volume/tests/api/test_lvm.py @@ -544,6 +544,7 @@ class TestCreateLV(object): self.foo_volume = api.Volume(lv_name='foo', lv_path='/path', vg_name='foo_group', lv_tags='') self.foo_group = api.VolumeGroup(vg_name='foo_group', vg_extent_size=4194304, + vg_extent_count=100, vg_free_count=100) @patch('ceph_volume.api.lvm.process.run') diff --git a/src/ceph-volume/ceph_volume/util/device.py b/src/ceph-volume/ceph_volume/util/device.py index 878a584ce69..4527c11b211 100644 --- a/src/ceph-volume/ceph_volume/util/device.py +++ b/src/ceph-volume/ceph_volume/util/device.py @@ -403,11 +403,16 @@ class Device(object): return rejected def _check_lvm_reject_reasons(self): - rejected = self._check_generic_reject_reasons() + rejected = [] available_vgs = [vg for vg in self.vgs if vg.free >= 5368709120] if self.vgs and not available_vgs: rejected.append('Insufficient space (<5GB) on vgs') + if not self.vgs: + # only check generic if no vgs are present. Vgs might hold lvs and + # that might cause 'locked' to trigger + rejected.extend(self._check_generic_reject_reasons()) + return len(rejected) == 0, rejected def _check_raw_reject_reasons(self): diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 64515caa1d8..c89ce1dea92 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -2637,19 +2637,16 @@ def command_ceph_volume(): tmp_config = None tmp_keyring = None - if args.config_json: - # note: this will always pull from args.config_json (we - # require it) and never args.config or args.keyring. - (config, keyring) = get_config_and_keyring() + (config, keyring) = get_config_and_keyring() - # tmp keyring file - tmp_keyring = write_tmp(keyring, uid, gid) + # tmp keyring file + tmp_keyring = write_tmp(keyring, uid, gid) - # tmp config file - tmp_config = write_tmp(config, uid, gid) + # tmp config file + tmp_config = write_tmp(config, uid, gid) - mounts[tmp_config.name] = '/etc/ceph/ceph.conf:z' - mounts[tmp_keyring.name] = '/var/lib/ceph/bootstrap-osd/ceph.keyring:z' + mounts[tmp_config.name] = '/etc/ceph/ceph.conf:z' + mounts[tmp_keyring.name] = '/var/lib/ceph/bootstrap-osd/ceph.keyring:z' c = CephContainer( image=args.image, @@ -3973,6 +3970,12 @@ def _get_parser(): '--config-json', help='JSON file with config and (client.bootrap-osd) key') parser_ceph_volume.add_argument( + '--config', '-c', + help='ceph conf file') + parser_ceph_volume.add_argument( + '--keyring', '-k', + help='ceph.keyring to pass through to the container') + parser_ceph_volume.add_argument( 'command', nargs='+', help='command') diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc index b6ae25d7c91..6c8dfc61a3d 100644 --- a/src/cls/rbd/cls_rbd.cc +++ b/src/cls/rbd/cls_rbd.cc @@ -5356,7 +5356,7 @@ int image_status_get_summary( cls_method_context_t hctx, cls::rbd::MirrorPeerDirection mirror_peer_direction, const std::set<std::string>& tx_peer_mirror_uuids, - std::map<cls::rbd::MirrorImageStatusState, int> *states) { + std::map<cls::rbd::MirrorImageStatusState, int32_t> *states) { std::set<entity_inst_t> watchers; int r = list_watchers(hctx, &watchers); if (r < 0) { @@ -6450,7 +6450,7 @@ int mirror_image_status_list(cls_method_context_t hctx, bufferlist *in, * @param std::vector<cls::rbd::MirrorPeer> - optional peers (backwards compatibility) * * Output: - * @param std::map<cls::rbd::MirrorImageStatusState, int>: states counts + * @param std::map<cls::rbd::MirrorImageStatusState, int32_t>: states counts * @returns 0 on success, negative error code on failure */ int mirror_image_status_get_summary(cls_method_context_t hctx, bufferlist *in, @@ -6483,7 +6483,7 @@ int mirror_image_status_get_summary(cls_method_context_t hctx, bufferlist *in, } } - std::map<cls::rbd::MirrorImageStatusState, int> states; + std::map<cls::rbd::MirrorImageStatusState, int32_t> states; int r = mirror::image_status_get_summary(hctx, mirror_peer_direction, tx_peer_mirror_uuids, &states); if (r < 0) { diff --git a/src/cls/rbd/cls_rbd_client.cc b/src/cls/rbd/cls_rbd_client.cc index 4ec2d667242..1de9306a682 100644 --- a/src/cls/rbd/cls_rbd_client.cc +++ b/src/cls/rbd/cls_rbd_client.cc @@ -2232,7 +2232,7 @@ int mirror_image_status_list_finish(bufferlist::const_iterator *iter, int mirror_image_status_get_summary( librados::IoCtx *ioctx, const std::vector<cls::rbd::MirrorPeer>& mirror_peer_sites, - std::map<cls::rbd::MirrorImageStatusState, int> *states) { + std::map<cls::rbd::MirrorImageStatusState, int32_t> *states) { librados::ObjectReadOperation op; mirror_image_status_get_summary_start(&op, mirror_peer_sites); @@ -2260,7 +2260,7 @@ void mirror_image_status_get_summary_start( int mirror_image_status_get_summary_finish( bufferlist::const_iterator *iter, - std::map<cls::rbd::MirrorImageStatusState, int> *states) { + std::map<cls::rbd::MirrorImageStatusState, int32_t> *states) { try { decode(*states, *iter); } catch (const buffer::error &err) { diff --git a/src/cls/rbd/cls_rbd_client.h b/src/cls/rbd/cls_rbd_client.h index 55353e0746f..23917b91b33 100644 --- a/src/cls/rbd/cls_rbd_client.h +++ b/src/cls/rbd/cls_rbd_client.h @@ -470,13 +470,13 @@ int mirror_image_status_list_finish(bufferlist::const_iterator *iter, int mirror_image_status_get_summary( librados::IoCtx *ioctx, const std::vector<cls::rbd::MirrorPeer>& mirror_peer_sites, - std::map<cls::rbd::MirrorImageStatusState, int> *states); + std::map<cls::rbd::MirrorImageStatusState, int32_t> *states); void mirror_image_status_get_summary_start( librados::ObjectReadOperation *op, const std::vector<cls::rbd::MirrorPeer>& mirror_peer_sites); int mirror_image_status_get_summary_finish( bufferlist::const_iterator *iter, - std::map<cls::rbd::MirrorImageStatusState, int> *states); + std::map<cls::rbd::MirrorImageStatusState, int32_t> *states); int mirror_image_status_remove_down(librados::IoCtx *ioctx); void mirror_image_status_remove_down(librados::ObjectWriteOperation *op); diff --git a/src/common/CommandTable.h b/src/common/CommandTable.h index 419988f7748..53218d65351 100644 --- a/src/common/CommandTable.h +++ b/src/common/CommandTable.h @@ -34,13 +34,13 @@ class CommandOp bool mgr=false) const { if (mgr) { - auto m = make_message<MMgrCommand>(fsid); + auto m = ceph::make_message<MMgrCommand>(fsid); m->cmd = cmd; m->set_data(inbl); m->set_tid(tid); return m; } else { - auto m = make_message<MCommand>(fsid); + auto m = ceph::make_message<MCommand>(fsid); m->cmd = cmd; m->set_data(inbl); m->set_tid(tid); diff --git a/src/common/DecayCounter.cc b/src/common/DecayCounter.cc index f34a6eba386..4e9e68cc152 100644 --- a/src/common/DecayCounter.cc +++ b/src/common/DecayCounter.cc @@ -17,7 +17,7 @@ #include "include/encoding.h" -void DecayCounter::encode(bufferlist& bl) const +void DecayCounter::encode(ceph::buffer::list& bl) const { decay(); ENCODE_START(5, 4, bl); @@ -25,7 +25,7 @@ void DecayCounter::encode(bufferlist& bl) const ENCODE_FINISH(bl); } -void DecayCounter::decode(bufferlist::const_iterator &p) +void DecayCounter::decode(ceph::buffer::list::const_iterator &p) { DECODE_START_LEGACY_COMPAT_LEN(5, 4, 4, p); if (struct_v < 2) { @@ -47,7 +47,7 @@ void DecayCounter::decode(bufferlist::const_iterator &p) DECODE_FINISH(p); } -void DecayCounter::dump(Formatter *f) const +void DecayCounter::dump(ceph::Formatter *f) const { decay(); f->dump_float("value", val); diff --git a/src/common/DecayCounter.h b/src/common/DecayCounter.h index b9545b15161..2202b596e2a 100644 --- a/src/common/DecayCounter.h +++ b/src/common/DecayCounter.h @@ -60,9 +60,9 @@ public: DecayCounter() : DecayCounter(DecayRate()) {} explicit DecayCounter(const DecayRate &rate) : last_decay(clock::now()), rate(rate) {} - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator& p); - void dump(Formatter *f) const; + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator& p); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<DecayCounter*>& ls); /** @@ -117,10 +117,10 @@ private: DecayRate rate; }; -inline void encode(const DecayCounter &c, bufferlist &bl) { +inline void encode(const DecayCounter &c, ceph::buffer::list &bl) { c.encode(bl); } -inline void decode(DecayCounter &c, bufferlist::const_iterator &p) { +inline void decode(DecayCounter &c, ceph::buffer::list::const_iterator &p) { c.decode(p); } diff --git a/src/common/Graylog.cc b/src/common/Graylog.cc index 79a537eedde..accde0900a5 100644 --- a/src/common/Graylog.cc +++ b/src/common/Graylog.cc @@ -7,8 +7,9 @@ #include "log/Entry.h" #include "log/SubsystemMap.h" -namespace ceph { -namespace logging { +using std::cerr; + +namespace ceph::logging { Graylog::Graylog(const SubsystemMap * const s, const std::string &logger) : m_subs(s), @@ -166,5 +167,4 @@ void Graylog::log_log_entry(LogEntry const * const e) } } -} // ceph::logging:: -} // ceph:: +} // name ceph::logging diff --git a/src/common/HeartbeatMap.cc b/src/common/HeartbeatMap.cc index 165fdbb3fac..7e5b8140632 100644 --- a/src/common/HeartbeatMap.cc +++ b/src/common/HeartbeatMap.cc @@ -24,6 +24,10 @@ #undef dout_prefix #define dout_prefix *_dout << "heartbeat_map " +using std::chrono::duration_cast; +using std::chrono::seconds; +using std::string; + namespace ceph { HeartbeatMap::HeartbeatMap(CephContext *cct) @@ -88,8 +92,8 @@ void HeartbeatMap::reset_timeout(heartbeat_handle_d *h, { ldout(m_cct, 20) << "reset_timeout '" << h->name << "' grace " << grace << " suicide " << suicide_grace << dendl; - auto now = chrono::duration_cast<chrono::seconds>( - ceph::coarse_mono_clock::now().time_since_epoch()).count(); + auto now = duration_cast<seconds>(coarse_mono_clock::now() + .time_since_epoch()).count(); _check(h, "reset_timeout", now); h->timeout = now + grace; @@ -105,8 +109,8 @@ void HeartbeatMap::reset_timeout(heartbeat_handle_d *h, void HeartbeatMap::clear_timeout(heartbeat_handle_d *h) { ldout(m_cct, 20) << "clear_timeout '" << h->name << "'" << dendl; - auto now = chrono::duration_cast<std::chrono::seconds>( - ceph::coarse_mono_clock::now().time_since_epoch()).count(); + auto now = duration_cast<seconds>(coarse_mono_clock::now() + .time_since_epoch()).count(); _check(h, "clear_timeout", now); h->timeout = 0; h->suicide_timeout = 0; @@ -132,11 +136,11 @@ bool HeartbeatMap::is_healthy() healthy = false; } - for (list<heartbeat_handle_d*>::iterator p = m_workers.begin(); + for (auto p = m_workers.begin(); p != m_workers.end(); ++p) { heartbeat_handle_d *h = *p; - auto epoch = chrono::duration_cast<chrono::seconds>(now.time_since_epoch()).count(); + auto epoch = duration_cast<seconds>(now.time_since_epoch()).count(); if (!_check(h, "is_healthy", epoch)) { healthy = false; unhealthy++; diff --git a/src/common/LogClient.cc b/src/common/LogClient.cc index b941bd47e39..05e7101559b 100644 --- a/src/common/LogClient.cc +++ b/src/common/LogClient.cc @@ -22,6 +22,11 @@ #define dout_subsys ceph_subsys_monc +using std::map; +using std::ostream; +using std::ostringstream; +using std::string; + int parse_log_client_options(CephContext *cct, map<string,string> &log_to_monitors, map<string,string> &log_to_syslog, @@ -351,7 +356,7 @@ bool LogClient::handle_log_ack(MLogAck *m) version_t last = m->last; - deque<LogEntry>::iterator q = log_queue.begin(); + auto q = log_queue.begin(); while (q != log_queue.end()) { const LogEntry &entry(*q); if (entry.seq > last) @@ -361,4 +366,3 @@ bool LogClient::handle_log_ack(MLogAck *m) } return true; } - diff --git a/src/common/LogEntry.cc b/src/common/LogEntry.cc index 993bf444dc3..dfa1ab2fa1d 100644 --- a/src/common/LogEntry.cc +++ b/src/common/LogEntry.cc @@ -8,6 +8,17 @@ #include "Formatter.h" #include "include/stringify.h" +using std::list; +using std::map; +using std::make_pair; +using std::pair; +using std::string; + +using ceph::bufferlist; +using ceph::decode; +using ceph::encode; +using ceph::Formatter; + // ---- // LogEntryKey @@ -372,4 +383,3 @@ void LogSummary::generate_test_instances(list<LogSummary*>& o) o.push_back(new LogSummary); // more! } - diff --git a/src/common/OutputDataSocket.cc b/src/common/OutputDataSocket.cc index 33b27e6da76..2221de6462f 100644 --- a/src/common/OutputDataSocket.cc +++ b/src/common/OutputDataSocket.cc @@ -255,7 +255,7 @@ bool OutputDataSocket::do_accept() void OutputDataSocket::handle_connection(int fd) { - bufferlist bl; + ceph::buffer::list bl; m_lock.lock(); init_connection(bl); @@ -294,13 +294,13 @@ void OutputDataSocket::handle_connection(int fd) int OutputDataSocket::dump_data(int fd) { m_lock.lock(); - vector<buffer::list> l = std::move(data); + auto l = std::move(data); data.clear(); data_size = 0; m_lock.unlock(); for (auto iter = l.begin(); iter != l.end(); ++iter) { - bufferlist& bl = *iter; + ceph::buffer::list& bl = *iter; int ret = safe_write(fd, bl.c_str(), bl.length()); if (ret >= 0) { ret = safe_write(fd, delim.c_str(), delim.length()); @@ -308,7 +308,7 @@ int OutputDataSocket::dump_data(int fd) if (ret < 0) { std::scoped_lock lock(m_lock); for (; iter != l.end(); ++iter) { - bufferlist& bl = *iter; + ceph::buffer::list& bl = *iter; data.push_back(bl); data_size += bl.length(); } @@ -384,7 +384,7 @@ void OutputDataSocket::shutdown() m_path.clear(); } -void OutputDataSocket::append_output(bufferlist& bl) +void OutputDataSocket::append_output(ceph::buffer::list& bl) { std::lock_guard l(m_lock); diff --git a/src/common/OutputDataSocket.h b/src/common/OutputDataSocket.h index 5a6bc4ff9fc..397d93f16f8 100644 --- a/src/common/OutputDataSocket.h +++ b/src/common/OutputDataSocket.h @@ -29,10 +29,10 @@ public: bool init(const std::string &path); - void append_output(bufferlist& bl); + void append_output(ceph::buffer::list& bl); protected: - virtual void init_connection(bufferlist& bl) {} + virtual void init_connection(ceph::buffer::list& bl) {} void shutdown(); std::string create_shutdown_pipe(int *pipe_rd, int *pipe_wr); @@ -57,11 +57,11 @@ protected: uint64_t data_size; uint32_t skipped; - std::vector<buffer::list> data; + std::vector<ceph::buffer::list> data; ceph::mutex m_lock = ceph::make_mutex("OutputDataSocket::m_lock"); ceph::condition_variable cond; - buffer::list delim; + ceph::buffer::list delim; }; #endif diff --git a/src/common/PluginRegistry.cc b/src/common/PluginRegistry.cc index 2cb7fcee8db..c697aaa17f0 100644 --- a/src/common/PluginRegistry.cc +++ b/src/common/PluginRegistry.cc @@ -34,6 +34,11 @@ #define dout_subsys ceph_subsys_context +using std::map; +using std::string; + +namespace ceph { + PluginRegistry::PluginRegistry(CephContext *cct) : cct(cct), loading(false), @@ -211,6 +216,7 @@ int PluginRegistry::load(const std::string &type, << " loaded and registered" << dendl; return 0; } +} /* int ErasureCodePluginRegistry::preload(const std::string &plugins, diff --git a/src/common/Readahead.cc b/src/common/Readahead.cc index 2d2b35ff781..5ce820fedee 100644 --- a/src/common/Readahead.cc +++ b/src/common/Readahead.cc @@ -4,6 +4,8 @@ #include "common/Readahead.h" #include "common/Cond.h" +using std::vector; + Readahead::Readahead() : m_trigger_requests(10), m_readahead_min_bytes(0), @@ -30,7 +32,7 @@ Readahead::extent_t Readahead::update(const vector<extent_t>& extents, uint64_t m_lock.unlock(); return extent_t(0, 0); } - pair<uint64_t, uint64_t> extent = _compute_readahead(limit); + std::pair<uint64_t, uint64_t> extent = _compute_readahead(limit); m_lock.unlock(); return extent; } diff --git a/src/common/SloppyCRCMap.cc b/src/common/SloppyCRCMap.cc index 102a6399765..ec9cbdf53a6 100644 --- a/src/common/SloppyCRCMap.cc +++ b/src/common/SloppyCRCMap.cc @@ -5,6 +5,7 @@ #include "common/Formatter.h" using namespace std; +using ceph::bufferlist; void SloppyCRCMap::write(uint64_t offset, uint64_t len, const bufferlist& bl, std::ostream *out) diff --git a/src/common/SloppyCRCMap.h b/src/common/SloppyCRCMap.h index 0c2d646fa8c..6bbfe978a4c 100644 --- a/src/common/SloppyCRCMap.h +++ b/src/common/SloppyCRCMap.h @@ -33,7 +33,7 @@ public: block_size = b; //zero_crc = ceph_crc32c(0xffffffff, NULL, block_size); if (b) { - bufferlist bl; + ceph::buffer::list bl; bl.append_zero(block_size); zero_crc = bl.crc32c(crc_iv); } else { @@ -42,7 +42,7 @@ public: } /// update based on a write - void write(uint64_t offset, uint64_t len, const bufferlist& bl, + void write(uint64_t offset, uint64_t len, const ceph::buffer::list& bl, std::ostream *out = NULL); /// update based on a truncate @@ -64,10 +64,10 @@ public: * @param err option ostream to describe errors in detail * @returns error count, 0 for success */ - int read(uint64_t offset, uint64_t len, const bufferlist& bl, std::ostream *err); + int read(uint64_t offset, uint64_t len, const ceph::buffer::list& bl, std::ostream *err); - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator& bl); + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator& bl); void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<SloppyCRCMap*>& ls); }; diff --git a/src/common/Throttle.cc b/src/common/Throttle.cc index 69d0f1086b0..e483e154c9e 100644 --- a/src/common/Throttle.cc +++ b/src/common/Throttle.cc @@ -16,8 +16,13 @@ #undef dout_prefix #define dout_prefix *_dout << "throttle(" << name << " " << (void*)this << ") " +using std::list; +using std::ostream; +using std::string; + using ceph::mono_clock; using ceph::mono_time; +using ceph::timespan; enum { l_throttle_first = 532430, diff --git a/src/common/Timer.cc b/src/common/Timer.cc index dceee9b0c0b..39ad4531915 100644 --- a/src/common/Timer.cc +++ b/src/common/Timer.cc @@ -20,7 +20,9 @@ #undef dout_prefix #define dout_prefix *_dout << "timer(" << this << ")." +using std::pair; +using ceph::operator <<; class SafeTimerThread : public Thread { SafeTimer *parent; diff --git a/src/common/TrackedOp.cc b/src/common/TrackedOp.cc index 494cfcdf686..f1b35e7e57a 100644 --- a/src/common/TrackedOp.cc +++ b/src/common/TrackedOp.cc @@ -17,6 +17,16 @@ #undef dout_prefix #define dout_prefix _prefix(_dout) +using std::list; +using std::make_pair; +using std::ostream; +using std::pair; +using std::set; +using std::string; +using std::stringstream; + +using ceph::Formatter; + static ostream& _prefix(std::ostream* _dout) { return *_dout << "-- op tracker -- "; diff --git a/src/common/WorkQueue.cc b/src/common/WorkQueue.cc index 93b2aadd8a8..c1b8c18e097 100644 --- a/src/common/WorkQueue.cc +++ b/src/common/WorkQueue.cc @@ -20,8 +20,7 @@ #undef dout_prefix #define dout_prefix *_dout << name << " " - -ThreadPool::ThreadPool(CephContext *cct_, string nm, string tn, int n, const char *option) +ThreadPool::ThreadPool(CephContext *cct_, std::string nm, std::string tn, int n, const char *option) : cct(cct_), name(std::move(nm)), thread_name(std::move(tn)), lockname(name + "::lock"), _lock(ceph::make_mutex(lockname)), // this should be safe due to declaration order @@ -83,10 +82,10 @@ void ThreadPool::worker(WorkThread *wt) { std::unique_lock ul(_lock); ldout(cct,10) << "worker start" << dendl; - + std::stringstream ss; ss << name << " thread " << (void *)pthread_self(); - heartbeat_handle_d *hb = cct->get_heartbeat_map()->add_worker(ss.str(), pthread_self()); + auto hb = cct->get_heartbeat_map()->add_worker(ss.str(), pthread_self()); while (!_stop) { @@ -197,9 +196,7 @@ void ThreadPool::stop(bool clear_after) _cond.notify_all(); join_old_threads(); _lock.unlock(); - for (set<WorkThread*>::iterator p = _threads.begin(); - p != _threads.end(); - ++p) { + for (auto p = _threads.begin(); p != _threads.end(); ++p) { (*p)->join(); delete *p; } @@ -252,8 +249,8 @@ void ThreadPool::drain(WorkQueue_* wq) _draining--; } -ShardedThreadPool::ShardedThreadPool(CephContext *pcct_, string nm, string tn, - uint32_t pnum_threads): +ShardedThreadPool::ShardedThreadPool(CephContext *pcct_, std::string nm, std::string tn, + uint32_t pnum_threads): cct(pcct_), name(std::move(nm)), thread_name(std::move(tn)), @@ -271,7 +268,7 @@ void ShardedThreadPool::shardedthreadpool_worker(uint32_t thread_index) std::stringstream ss; ss << name << " thread " << (void *)pthread_self(); - heartbeat_handle_d *hb = cct->get_heartbeat_map()->add_worker(ss.str(), pthread_self()); + auto hb = cct->get_heartbeat_map()->add_worker(ss.str(), pthread_self()); while (!stop_threads) { if (pause_threads) { @@ -348,7 +345,7 @@ void ShardedThreadPool::stop() stop_threads = true; ceph_assert(wq != NULL); wq->return_waiting_threads(); - for (vector<WorkThreadSharded*>::iterator p = threads_shardedpool.begin(); + for (auto p = threads_shardedpool.begin(); p != threads_shardedpool.end(); ++p) { (*p)->join(); diff --git a/src/common/address_helper.cc b/src/common/address_helper.cc index cdb8591f17a..29f99a8cd5e 100644 --- a/src/common/address_helper.cc +++ b/src/common/address_helper.cc @@ -19,8 +19,8 @@ int entity_addr_from_url(entity_addr_t *addr /* out */, const char *url) std::cmatch m; if (std::regex_match(url, m, expr)) { - string host(m[2].first, m[2].second); - string port(m[3].first, m[3].second); + std::string host(m[2].first, m[2].second); + std::string port(m[3].first, m[3].second); addrinfo hints; // FIPS zeroization audit 20191115: this memset is fine. memset(&hints, 0, sizeof(hints)); @@ -36,4 +36,3 @@ int entity_addr_from_url(entity_addr_t *addr /* out */, const char *url) return 1; } - diff --git a/src/common/admin_socket.cc b/src/common/admin_socket.cc index 1f57ca0832f..f7c042e5d14 100644 --- a/src/common/admin_socket.cc +++ b/src/common/admin_socket.cc @@ -41,10 +41,19 @@ #undef dout_prefix #define dout_prefix *_dout << "asok(" << (void*)m_cct << ") " +using namespace std::literals; using std::ostringstream; +using std::string; +using std::stringstream; + using namespace TOPNSPC::common; +using ceph::bufferlist; +using ceph::cref_t; +using ceph::Formatter; + + /* * UNIX domain sockets created by an application persist even after that * application closes, unless they're explicitly unlinked. This is because the @@ -490,7 +499,7 @@ void AdminSocket::execute_command( empty); } - Formatter *f = Formatter::create(format, "json-pretty", "json-pretty"); + auto f = Formatter::create(format, "json-pretty", "json-pretty"); std::unique_lock l(lock); decltype(hooks)::iterator p; @@ -651,7 +660,7 @@ public: // do what you'd expect. GCC 7 does not. (void)command; ostringstream secname; - secname << "cmd" << setfill('0') << std::setw(3) << cmdnum; + secname << "cmd" << std::setfill('0') << std::setw(3) << cmdnum; dump_cmd_and_help_to_json(f, CEPH_FEATURES_ALL, secname.str().c_str(), diff --git a/src/common/admin_socket.h b/src/common/admin_socket.h index 2105097bbee..429b69e0039 100644 --- a/src/common/admin_socket.h +++ b/src/common/admin_socket.h @@ -30,13 +30,10 @@ #include "common/ref.h" #include "common/cmdparse.h" -class AdminSocket; class MCommand; class MMonCommand; -using namespace std::literals; - -inline constexpr auto CEPH_ADMIN_SOCK_VERSION = "2"sv; +inline constexpr auto CEPH_ADMIN_SOCK_VERSION = std::string_view("2"); class AdminSocketHook { public: @@ -63,7 +60,7 @@ public: virtual int call( std::string_view command, const cmdmap_t& cmdmap, - Formatter *f, + ceph::Formatter *f, std::ostream& errss, ceph::buffer::list& out) = 0; @@ -93,11 +90,11 @@ public: virtual void call_async( std::string_view command, const cmdmap_t& cmdmap, - Formatter *f, - const bufferlist& inbl, - std::function<void(int,const std::string&,bufferlist&)> on_finish) { + ceph::Formatter *f, + const ceph::buffer::list& inbl, + std::function<void(int,const std::string&,ceph::buffer::list&)> on_finish) { // by default, call the synchronous handler and then finish - bufferlist out; + ceph::buffer::list out; std::ostringstream errss; int r = call(command, cmdmap, f, errss, out); on_finish(r, errss.str(), out); @@ -152,18 +149,18 @@ public: /// execute (async) void execute_command( const std::vector<std::string>& cmd, - const bufferlist& inbl, - std::function<void(int,const std::string&,bufferlist&)> on_fin); + const ceph::buffer::list& inbl, + std::function<void(int,const std::string&,ceph::buffer::list&)> on_fin); /// execute (blocking) int execute_command( const std::vector<std::string>& cmd, - const bufferlist& inbl, + const ceph::buffer::list& inbl, std::ostream& errss, - bufferlist *outbl); + ceph::buffer::list *outbl); - void queue_tell_command(cref_t<MCommand> m); - void queue_tell_command(cref_t<MMonCommand> m); // for compat + void queue_tell_command(ceph::cref_t<MCommand> m); + void queue_tell_command(ceph::cref_t<MMonCommand> m); // for compat private: @@ -194,8 +191,8 @@ private: std::unique_ptr<AdminSocketHook> getdescs_hook; std::mutex tell_lock; - std::list<cref_t<MCommand>> tell_queue; - std::list<cref_t<MMonCommand>> tell_legacy_queue; + std::list<ceph::cref_t<MCommand>> tell_queue; + std::list<ceph::cref_t<MMonCommand>> tell_legacy_queue; struct hook_info { AdminSocketHook* hook; diff --git a/src/common/assert.cc b/src/common/assert.cc index 6fb50014f43..a663c16e907 100644 --- a/src/common/assert.cc +++ b/src/common/assert.cc @@ -15,6 +15,8 @@ #include "include/compat.h" #include "common/debug.h" +using std::ostringstream; + namespace ceph { static CephContext *g_assert_context = NULL; @@ -156,7 +158,7 @@ namespace ceph { } [[gnu::cold]] void __ceph_abort(const char *file, int line, - const char *func, const string& msg) + const char *func, const std::string& msg) { ostringstream tss; tss << ceph_clock_now(); diff --git a/src/common/blkdev.cc b/src/common/blkdev.cc index 0260a69e470..8c76a90b6bb 100644 --- a/src/common/blkdev.cc +++ b/src/common/blkdev.cc @@ -38,6 +38,7 @@ #include "json_spirit/json_spirit_reader.h" + int get_device_by_path(const char *path, char* partition, char* device, size_t max) { @@ -77,6 +78,12 @@ int get_device_by_path(const char *path, char* partition, char* device, #endif +using namespace std::literals; + +using std::string; + +using ceph::bufferlist; + BlkDev::BlkDev(int f) : fd(f) diff --git a/src/common/bloom_filter.cc b/src/common/bloom_filter.cc index 789e8ba685d..9033f045444 100644 --- a/src/common/bloom_filter.cc +++ b/src/common/bloom_filter.cc @@ -5,6 +5,10 @@ MEMPOOL_DEFINE_FACTORY(unsigned char, byte, bloom_filter); +using ceph::bufferlist; +using ceph::bufferptr; +using ceph::Formatter; + void bloom_filter::encode(bufferlist& bl) const { ENCODE_START(2, 2, bl); diff --git a/src/common/buffer.cc b/src/common/buffer.cc index 0446ec88cf8..7f9acb511e7 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -36,6 +36,11 @@ #include "include/spinlock.h" #include "include/scope_guard.h" +using std::cerr; +using std::make_pair; +using std::pair; +using std::string; + using namespace ceph; #define CEPH_BUFFER_ALLOC_UNIT 4096u diff --git a/src/common/ceph_argparse.cc b/src/common/ceph_argparse.cc index 631bc7c5470..85705982c16 100644 --- a/src/common/ceph_argparse.cc +++ b/src/common/ceph_argparse.cc @@ -55,9 +55,9 @@ struct strict_str_convert { void string_to_vec(std::vector<std::string>& args, std::string argstr) { - istringstream iss(argstr); + std::istringstream iss(argstr); while(iss) { - string sub; + std::string sub; iss >> sub; if (sub == "") break; args.push_back(sub); @@ -79,7 +79,7 @@ split_dashdash(const std::vector<const char*>& args) { } static std::mutex g_str_vec_lock; -static vector<string> g_str_vec; +static std::vector<std::string> g_str_vec; void clear_g_str_vec() { @@ -138,7 +138,7 @@ void vec_to_argv(const char *argv0, std::vector<const char*>& args, { *argv = (const char**)malloc(sizeof(char*) * (args.size() + 1)); if (!*argv) - throw bad_alloc(); + throw std::bad_alloc(); *argc = 1; (*argv)[0] = argv0; @@ -191,10 +191,10 @@ void ceph_arg_value_type(const char * nextargstr, bool *bool_option, bool *bool_ } -bool parse_ip_port_vec(const char *s, vector<entity_addrvec_t>& vec, int type) +bool parse_ip_port_vec(const char *s, std::vector<entity_addrvec_t>& vec, int type) { // first split by [ ;], which are not valid for an addrvec - list<string> items; + std::list<std::string> items; get_str_list(s, " ;", items); for (auto& i : items) { @@ -480,7 +480,7 @@ bool ceph_argparse_witharg(std::vector<const char*> &args, int r; va_list ap; va_start(ap, ret); - r = va_ceph_argparse_witharg(args, i, ret, cerr, ap); + r = va_ceph_argparse_witharg(args, i, ret, std::cerr, ap); va_end(ap); if (r < 0) _exit(1); @@ -494,7 +494,7 @@ CephInitParameters ceph_argparse_early_args CephInitParameters iparams(module_type); std::string val; - vector<const char *> orig_args = args; + auto orig_args = args; for (std::vector<const char*>::iterator i = args.begin(); i != args.end(); ) { if (strcmp(*i, "--") == 0) { @@ -504,7 +504,7 @@ CephInitParameters ceph_argparse_early_args break; } else if (ceph_argparse_flag(args, i, "--version", "-v", (char*)NULL)) { - cout << pretty_version_to_str() << std::endl; + std::cout << pretty_version_to_str() << std::endl; _exit(0); } else if (ceph_argparse_witharg(args, i, &val, "--conf", "-c", (char*)NULL)) { @@ -525,20 +525,20 @@ CephInitParameters ceph_argparse_early_args } else if (ceph_argparse_witharg(args, i, &val, "--name", "-n", (char*)NULL)) { if (!iparams.name.from_str(val)) { - cerr << "error parsing '" << val << "': expected string of the form TYPE.ID, " - << "valid types are: " << EntityName::get_valid_types_as_str() - << std::endl; + std::cerr << "error parsing '" << val << "': expected string of the form TYPE.ID, " + << "valid types are: " << EntityName::get_valid_types_as_str() + << std::endl; _exit(1); } } else if (ceph_argparse_flag(args, i, "--show_args", (char*)NULL)) { - cout << "args: "; + std::cout << "args: "; for (std::vector<const char *>::iterator ci = orig_args.begin(); ci != orig_args.end(); ++ci) { - if (ci != orig_args.begin()) - cout << " "; - cout << *ci; + if (ci != orig_args.begin()) + std::cout << " "; + std::cout << *ci; } - cout << std::endl; + std::cout << std::endl; } else { // ignore @@ -550,7 +550,7 @@ CephInitParameters ceph_argparse_early_args static void generic_usage(bool is_server) { - cout << + std::cout << " --conf/-c FILE read configuration from the given configuration file" << std::endl << (is_server ? " --id/-i ID set ID portion of my name" : @@ -563,14 +563,14 @@ static void generic_usage(bool is_server) << std::endl; if (is_server) { - cout << + std::cout << " -d run in foreground, log to stderr" << std::endl << " -f run in foreground, log to usual location" << std::endl << std::endl << " --debug_ms N set message debug level (e.g. 1)" << std::endl; } - cout.flush(); + std::cout.flush(); } bool ceph_argparse_need_usage(const std::vector<const char*>& args) diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc index e7116e38875..d4248d9e9b1 100644 --- a/src/common/ceph_context.cc +++ b/src/common/ceph_context.cc @@ -46,15 +46,18 @@ #include "common/valgrind.h" #include "include/spinlock.h" -using ceph::bufferlist; -using ceph::HeartbeatMap; - // for CINIT_FLAGS #include "common/common_init.h" #include <iostream> #include <pthread.h> +using namespace std::literals; + +using ceph::bufferlist; +using ceph::HeartbeatMap; + + #if defined(WITH_SEASTAR) && !defined(WITH_ALIEN) namespace crimson::common { CephContext::CephContext() @@ -171,7 +174,7 @@ public: // AdminSocketHook int call(std::string_view command, const cmdmap_t& cmdmap, - Formatter *f, + ceph::Formatter *f, std::ostream& errss, bufferlist& out) override { if (command == "dump_mempools") { @@ -316,7 +319,7 @@ public: } if (changed.count("log_stderr_prefix")) { - log->set_log_stderr_prefix(conf.get_val<string>("log_stderr_prefix")); + log->set_log_stderr_prefix(conf.get_val<std::string>("log_stderr_prefix")); } if (changed.count("log_max_new")) { @@ -426,7 +429,7 @@ public: bool CephContext::check_experimental_feature_enabled(const std::string& feat) { - stringstream message; + std::stringstream message; bool enabled = check_experimental_feature_enabled(feat, &message); lderr(this) << message.str() << dendl; return enabled; @@ -562,13 +565,13 @@ int CephContext::_do_command( r = -EINVAL; } else { // val may be multiple words - string valstr = str_join(val, " "); + auto valstr = str_join(val, " "); r = _conf.set_val(var.c_str(), valstr.c_str()); if (r < 0) { ss << "error setting '" << var << "' to '" << valstr << "': " << cpp_strerror(r); } else { - stringstream ss; + std::stringstream ss; _conf.apply_changes(&ss); f->dump_string("success", ss.str()); } @@ -620,12 +623,10 @@ int CephContext::_do_command( f->close_section(); // unknown } else if (command == "injectargs") { - vector<string> argsvec; + std::vector<std::string> argsvec; cmd_getval(cmdmap, "injected_args", argsvec); if (!argsvec.empty()) { - string args = joinify<std::string>(argsvec.begin(), - argsvec.end(), - " "); + auto args = joinify<std::string>(argsvec.begin(), argsvec.end(), " "); r = _conf.injectargs(args, &ss); } } @@ -890,13 +891,13 @@ void CephContext::_enable_perf_counter() _mempool_perf_names.reserve(mempool::num_pools * 2); _mempool_perf_descriptions.reserve(mempool::num_pools * 2); for (unsigned i = 0; i < mempool::num_pools; ++i) { - string n = mempool::get_pool_name(mempool::pool_index_t(i)); - _mempool_perf_names.push_back(n + "_bytes"); + std::string n = mempool::get_pool_name(mempool::pool_index_t(i)); + _mempool_perf_names.push_back(n + "_bytes"s); _mempool_perf_descriptions.push_back( - string("mempool ") + n + " total bytes"); - _mempool_perf_names.push_back(n + "_items"); + "mempool "s + n + " total bytes"); + _mempool_perf_names.push_back(n + "_items"s); _mempool_perf_descriptions.push_back( - string("mempool ") + n + " total items"); + "mempool "s + n + " total items"s); } PerfCountersBuilder plb2(this, "mempool", l_mempool_first, diff --git a/src/common/ceph_json.cc b/src/common/ceph_json.cc index 8b79a969fa9..50906a42e6d 100644 --- a/src/common/ceph_json.cc +++ b/src/common/ceph_json.cc @@ -13,11 +13,18 @@ using namespace json_spirit; -#define dout_subsys ceph_subsys_rgw +using std::ifstream; +using std::pair; +using std::ostream; +using std::string; +using std::vector; +using ceph::bufferlist; +using ceph::Formatter; -static JSONFormattable default_formattable; +#define dout_subsys ceph_subsys_rgw +static JSONFormattable default_formattable; void encode_json(const char *name, const JSONObj::data_val& v, Formatter *f) { @@ -61,8 +68,7 @@ ostream& operator<<(ostream &out, const JSONObj &obj) { JSONObj::~JSONObj() { - multimap<string, JSONObj *>::iterator iter; - for (iter = children.begin(); iter != children.end(); ++iter) { + for (auto iter = children.begin(); iter != children.end(); ++iter) { JSONObj *obj = iter->second; delete obj; } @@ -86,11 +92,9 @@ bool JSONObj::get_attr(string name, data_val& attr) JSONObjIter JSONObj::find(const string& name) { JSONObjIter iter; - map<string, JSONObj *>::iterator first; - map<string, JSONObj *>::iterator last; - first = children.find(name); + auto first = children.find(name); if (first != children.end()) { - last = children.upper_bound(name); + auto last = children.upper_bound(name); iter.set(first, last); } return iter; @@ -106,8 +110,7 @@ JSONObjIter JSONObj::find_first() JSONObjIter JSONObj::find_first(const string& name) { JSONObjIter iter; - map<string, JSONObj *>::iterator first; - first = children.find(name); + auto first = children.find(name); iter.set(first, children.end()); return iter; } @@ -457,7 +460,7 @@ void decode_json_obj(bufferlist& val, JSONObj *obj) bl.append(s.c_str(), s.size()); try { val.decode_base64(bl); - } catch (buffer::error& err) { + } catch (ceph::buffer::error& err) { throw JSONDecoder::err("failed to decode base64"); } } diff --git a/src/common/ceph_time.cc b/src/common/ceph_time.cc index bb708bb4675..1d3b0e1d6b7 100644 --- a/src/common/ceph_time.cc +++ b/src/common/ceph_time.cc @@ -52,6 +52,8 @@ int clock_gettime(int clk_id, struct timespec *tp) } #endif +using namespace std::literals; + namespace ceph { namespace time_detail { void real_clock::to_ceph_timespec(const time_point& t, @@ -155,7 +157,7 @@ namespace ceph { // FIXME: somebody pretty please make a version of this function // that isn't as lame as this one! uint64_t nsec = std::chrono::nanoseconds(t).count(); - ostringstream ss; + std::ostringstream ss; if (nsec < 2000000000) { ss << ((float)nsec / 1000000000) << "s"; return ss.str(); @@ -201,7 +203,7 @@ namespace ceph { uint64_t sec = nsec / 1000000000; nsec %= 1000000000; uint64_t yr = sec / (60 * 60 * 24 * 365); - ostringstream ss; + std::ostringstream ss; if (yr) { ss << yr << "y"; sec -= yr * (60 * 60 * 24 * 365); @@ -245,7 +247,7 @@ namespace ceph { std::chrono::seconds parse_timespan(const std::string& s) { - static std::map<string,int> units = { + static std::map<std::string,int> units = { { "s", 1 }, { "sec", 1 }, { "second", 1 }, @@ -291,13 +293,13 @@ namespace ceph { ++pos; } if (val_start == pos) { - throw invalid_argument("expected digit"); + throw std::invalid_argument("expected digit"); } - string n = s.substr(val_start, pos - val_start); - string err; + auto n = s.substr(val_start, pos - val_start); + std::string err; auto val = strict_strtoll(n.c_str(), 10, &err); if (err.size()) { - throw invalid_argument(err); + throw std::invalid_argument(err); } // skip whitespace @@ -311,16 +313,16 @@ namespace ceph { ++pos; } if (unit_start != pos) { - string unit = s.substr(unit_start, pos - unit_start); + auto unit = s.substr(unit_start, pos - unit_start); auto p = units.find(unit); if (p == units.end()) { - throw invalid_argument("unrecogized unit '"s + unit + "'"); + throw std::invalid_argument("unrecogized unit '"s + unit + "'"); } val *= p->second; } else if (pos < s.size()) { - throw invalid_argument("unexpected trailing '"s + s.substr(pos) + "'"); + throw std::invalid_argument("unexpected trailing '"s + s.substr(pos) + "'"); } - r += chrono::seconds(val); + r += std::chrono::seconds(val); } return r; } diff --git a/src/common/cmdparse.cc b/src/common/cmdparse.cc index a19041845e1..6dbbb3925dd 100644 --- a/src/common/cmdparse.cc +++ b/src/common/cmdparse.cc @@ -19,6 +19,13 @@ #include "common/strtol.h" #include "json_spirit/json_spirit.h" +using std::is_same_v; +using std::ostringstream; +using std::string; +using std::stringstream; +using std::string_view; +using std::vector; + /** * Given a cmddesc like "foo baz name=bar,type=CephString", * return the prefix "foo baz". @@ -293,15 +300,14 @@ cmdmap_from_json(const vector<string>& cmd, cmdmap_t *mapp, stringstream &ss) try { if (!json_spirit::read(fullcmd, v)) - throw runtime_error("unparseable JSON " + fullcmd); + throw std::runtime_error("unparseable JSON " + fullcmd); if (v.type() != json_spirit::obj_type) - throw(runtime_error("not JSON object " + fullcmd)); + throw std::runtime_error("not JSON object " + fullcmd); // allocate new mObject (map) to return // make sure all contents are simple types (not arrays or objects) json_spirit::mObject o = v.get_obj(); - for (map<string, json_spirit::mValue>::iterator it = o.begin(); - it != o.end(); ++it) { + for (auto it = o.begin(); it != o.end(); ++it) { // ok, marshal it into our string->cmd_vartype map, or throw an // exception if it's not a simple datatype. This is kind of @@ -312,7 +318,7 @@ cmdmap_from_json(const vector<string>& cmd, cmdmap_t *mapp, stringstream &ss) case json_spirit::obj_type: default: - throw(runtime_error("JSON array/object not allowed " + fullcmd)); + throw std::runtime_error("JSON array/object not allowed " + fullcmd); break; case json_spirit::array_type: @@ -329,7 +335,7 @@ cmdmap_from_json(const vector<string>& cmd, cmdmap_t *mapp, stringstream &ss) vector<string> outv; for (const auto& sv : spvals) { if (sv.type() != json_spirit::str_type) { - throw(runtime_error("Can't handle arrays of multiple types")); + throw std::runtime_error("Can't handle arrays of multiple types"); } outv.push_back(sv.get_str()); } @@ -338,7 +344,7 @@ cmdmap_from_json(const vector<string>& cmd, cmdmap_t *mapp, stringstream &ss) vector<int64_t> outv; for (const auto& sv : spvals) { if (spvals.front().type() != json_spirit::int_type) { - throw(runtime_error("Can't handle arrays of multiple types")); + throw std::runtime_error("Can't handle arrays of multiple types"); } outv.push_back(sv.get_int64()); } @@ -347,14 +353,14 @@ cmdmap_from_json(const vector<string>& cmd, cmdmap_t *mapp, stringstream &ss) vector<double> outv; for (const auto& sv : spvals) { if (spvals.front().type() != json_spirit::real_type) { - throw(runtime_error("Can't handle arrays of multiple types")); + throw std::runtime_error("Can't handle arrays of multiple types"); } outv.push_back(sv.get_real()); } (*mapp)[it->first] = std::move(outv); } else { - throw(runtime_error("Can't handle arrays of types other than " - "int, string, or double")); + throw std::runtime_error("Can't handle arrays of types other than " + "int, string, or double"); } } break; @@ -376,7 +382,7 @@ cmdmap_from_json(const vector<string>& cmd, cmdmap_t *mapp, stringstream &ss) } } return true; - } catch (runtime_error &e) { + } catch (const std::runtime_error &e) { ss << e.what(); return false; } @@ -502,7 +508,7 @@ bool arg_in_range(T value, const arg_desc_t& desc, std::ostream& os) { } auto min_max = get_str_list(string(range->second), "|"); auto min = str_to_num<T>(min_max.front()); - auto max = numeric_limits<T>::max(); + auto max = std::numeric_limits<T>::max(); if (min_max.size() > 1) { max = str_to_num<T>(min_max.back()); } @@ -546,9 +552,9 @@ bool validate_str_arg(std::string_view value, template<bool is_vector, typename T, - typename Value = conditional_t<is_vector, - vector<T>, - T>> + typename Value = std::conditional_t<is_vector, + vector<T>, + T>> bool validate_arg(CephContext* cct, const cmdmap_t& cmdmap, const arg_desc_t& desc, diff --git a/src/common/common_init.cc b/src/common/common_init.cc index 2ad93a958c4..6e6a7ecf810 100644 --- a/src/common/common_init.cc +++ b/src/common/common_init.cc @@ -71,7 +71,7 @@ CephContext *common_preinit(const CephInitParameters &iparams, #endif // #ifndef WITH_SEASTAR void complain_about_parse_error(CephContext *cct, - const string& parse_error) + const std::string& parse_error) { if (parse_error.empty()) return; diff --git a/src/common/config.cc b/src/common/config.cc index eb6b721e12e..792cf5fa68c 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -37,11 +37,22 @@ // set set_mon_vals() #define dout_subsys ceph_subsys_monc +using std::cerr; +using std::cout; using std::map; +using std::less; using std::list; +using std::ostream; using std::ostringstream; using std::pair; using std::string; +using std::string_view; +using std::vector; + +using ceph::bufferlist; +using ceph::decode; +using ceph::encode; +using ceph::Formatter; static const char *CEPH_CONF_FILE_DEFAULT = "$data_dir/config, /etc/ceph/$cluster.conf, $home/.ceph/$cluster.conf, $cluster.conf" #if defined(__FreeBSD__) diff --git a/src/common/dns_resolve.cc b/src/common/dns_resolve.cc index 5b74ea065b4..a44510d6dea 100644 --- a/src/common/dns_resolve.cc +++ b/src/common/dns_resolve.cc @@ -20,6 +20,8 @@ #define dout_subsys ceph_subsys_ +using std::map; +using std::string; namespace ceph { @@ -52,8 +54,7 @@ int ResolvHWrapper::res_search(const char *hostname, int cls, DNSResolver::~DNSResolver() { #ifdef HAVE_RES_NQUERY - list<res_state>::iterator iter; - for (iter = states.begin(); iter != states.end(); ++iter) { + for (auto iter = states.begin(); iter != states.end(); ++iter) { struct __res_state *s = *iter; delete s; } diff --git a/src/common/fs_types.cc b/src/common/fs_types.cc index feb9167264f..0dd5528eaa2 100644 --- a/src/common/fs_types.cc +++ b/src/common/fs_types.cc @@ -1,9 +1,11 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab #include "include/fs_types.h" #include "common/Formatter.h" #include "include/ceph_features.h" -void dump(const ceph_file_layout& l, Formatter *f) +void dump(const ceph_file_layout& l, ceph::Formatter *f) { f->dump_unsigned("stripe_unit", l.fl_stripe_unit); f->dump_unsigned("stripe_count", l.fl_stripe_count); @@ -16,7 +18,7 @@ void dump(const ceph_file_layout& l, Formatter *f) f->dump_unsigned("pg_pool", l.fl_pg_pool); } -void dump(const ceph_dir_layout& l, Formatter *f) +void dump(const ceph_dir_layout& l, ceph::Formatter *f) { f->dump_unsigned("dir_hash", l.dl_dir_hash); f->dump_unsigned("unused1", l.dl_unused1); @@ -71,7 +73,7 @@ void file_layout_t::to_legacy(ceph_file_layout *fl) const fl->fl_pg_pool = 0; } -void file_layout_t::encode(bufferlist& bl, uint64_t features) const +void file_layout_t::encode(ceph::buffer::list& bl, uint64_t features) const { using ceph::encode; if ((features & CEPH_FEATURE_FS_FILE_LAYOUT_V2) == 0) { @@ -91,7 +93,7 @@ void file_layout_t::encode(bufferlist& bl, uint64_t features) const ENCODE_FINISH(bl); } -void file_layout_t::decode(bufferlist::const_iterator& p) +void file_layout_t::decode(ceph::buffer::list::const_iterator& p) { using ceph::decode; if (*p == 0) { @@ -109,7 +111,7 @@ void file_layout_t::decode(bufferlist::const_iterator& p) DECODE_FINISH(p); } -void file_layout_t::dump(Formatter *f) const +void file_layout_t::dump(ceph::Formatter *f) const { f->dump_unsigned("stripe_unit", stripe_unit); f->dump_unsigned("stripe_count", stripe_count); @@ -118,7 +120,7 @@ void file_layout_t::dump(Formatter *f) const f->dump_string("pool_ns", pool_ns); } -void file_layout_t::generate_test_instances(list<file_layout_t*>& o) +void file_layout_t::generate_test_instances(std::list<file_layout_t*>& o) { o.push_back(new file_layout_t); o.push_back(new file_layout_t); @@ -129,11 +131,10 @@ void file_layout_t::generate_test_instances(list<file_layout_t*>& o) o.back()->pool_ns = "myns"; } -ostream& operator<<(ostream& out, const file_layout_t &layout) +std::ostream& operator<<(std::ostream& out, const file_layout_t &layout) { - JSONFormatter f; + ceph::JSONFormatter f; layout.dump(&f); f.flush(out); return out; } - diff --git a/src/common/histogram.cc b/src/common/histogram.cc index b8a71b67e1a..62a7f44926b 100644 --- a/src/common/histogram.cc +++ b/src/common/histogram.cc @@ -16,7 +16,7 @@ #include "common/Formatter.h" // -- pow2_hist_t -- -void pow2_hist_t::dump(Formatter *f) const +void pow2_hist_t::dump(ceph::Formatter *f) const { f->open_array_section("histogram"); for (std::vector<int32_t>::const_iterator p = h.begin(); p != h.end(); ++p) @@ -25,14 +25,14 @@ void pow2_hist_t::dump(Formatter *f) const f->dump_int("upper_bound", upper_bound()); } -void pow2_hist_t::encode(bufferlist& bl) const +void pow2_hist_t::encode(ceph::buffer::list& bl) const { ENCODE_START(1, 1, bl); encode(h, bl); ENCODE_FINISH(bl); } -void pow2_hist_t::decode(bufferlist::const_iterator& p) +void pow2_hist_t::decode(ceph::buffer::list::const_iterator& p) { DECODE_START(1, p); decode(h, p); diff --git a/src/common/hobject.cc b/src/common/hobject.cc index e5da4a35d86..85d4237dcd5 100644 --- a/src/common/hobject.cc +++ b/src/common/hobject.cc @@ -4,6 +4,14 @@ #include "hobject.h" #include "common/Formatter.h" +using std::list; +using std::ostream; +using std::set; +using std::string; + +using ceph::bufferlist; +using ceph::Formatter; + static void append_escaped(const string &in, string *out) { for (string::const_iterator i = in.begin(); i != in.end(); ++i) { diff --git a/src/common/ipaddr.cc b/src/common/ipaddr.cc index a899df69785..d166dc8b412 100644 --- a/src/common/ipaddr.cc +++ b/src/common/ipaddr.cc @@ -1,3 +1,5 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab #include <arpa/inet.h> #include <ifaddrs.h> @@ -14,6 +16,8 @@ #include "msg/msg_types.h" #include "common/pick_address.h" +using std::string; + void netmask_ipv4(const struct in_addr *addr, unsigned int prefix_len, struct in_addr *out) { diff --git a/src/common/lockdep.cc b/src/common/lockdep.cc index cd87adce325..c62332c0cfc 100644 --- a/src/common/lockdep.cc +++ b/src/common/lockdep.cc @@ -29,16 +29,18 @@ struct lockdep_stopper_t { g_lockdep = 0; } }; + + static pthread_mutex_t lockdep_mutex = PTHREAD_MUTEX_INITIALIZER; static CephContext *g_lockdep_ceph_ctx = NULL; static lockdep_stopper_t lockdep_stopper; static ceph::unordered_map<std::string, int> lock_ids; -static map<int, std::string> lock_names; -static map<int, int> lock_refs; +static std::map<int, std::string> lock_names; +static std::map<int, int> lock_refs; static char free_ids[MAX_LOCKS/8]; // bit set = free -static ceph::unordered_map<pthread_t, map<int,BackTrace*> > held; +static ceph::unordered_map<pthread_t, std::map<int,ceph::BackTrace*> > held; static char follows[MAX_LOCKS][MAX_LOCKS/8]; // follows[a][b] means b taken after a -static BackTrace *follows_bt[MAX_LOCKS][MAX_LOCKS]; +static ceph::BackTrace *follows_bt[MAX_LOCKS][MAX_LOCKS]; unsigned current_maxid; int last_freed_id = -1; static bool free_ids_inited; @@ -93,7 +95,7 @@ void lockdep_unregister_ceph_context(CephContext *cct) lock_ids.clear(); // FIPS zeroization audit 20191115: these memsets are not security related. memset((void*)&follows[0][0], 0, current_maxid * MAX_LOCKS/8); - memset((void*)&follows_bt[0][0], 0, sizeof(BackTrace*) * current_maxid * MAX_LOCKS); + memset((void*)&follows_bt[0][0], 0, sizeof(ceph::BackTrace*) * current_maxid * MAX_LOCKS); } pthread_mutex_unlock(&lockdep_mutex); } @@ -104,11 +106,9 @@ int lockdep_dump_locks() if (!g_lockdep) goto out; - for (ceph::unordered_map<pthread_t, map<int,BackTrace*> >::iterator p = held.begin(); - p != held.end(); - ++p) { + for (auto p = held.begin(); p != held.end(); ++p) { lockdep_dout(0) << "--- thread " << p->first << " ---" << dendl; - for (map<int,BackTrace*>::iterator q = p->second.begin(); + for (auto q = p->second.begin(); q != p->second.end(); ++q) { lockdep_dout(0) << " * " << lock_names[q->first] << "\n"; @@ -205,7 +205,7 @@ void lockdep_unregister(int id) pthread_mutex_lock(&lockdep_mutex); std::string name; - map<int, std::string>::iterator p = lock_names.find(id); + auto p = lock_names.find(id); if (p == lock_names.end()) name = "unknown" ; else @@ -289,15 +289,13 @@ int lockdep_will_lock(const char *name, int id, bool force_backtrace, lockdep_dout(20) << "_will_lock " << name << " (" << id << ")" << dendl; // check dependency graph - map<int, BackTrace *> &m = held[p]; - for (map<int, BackTrace *>::iterator p = m.begin(); - p != m.end(); - ++p) { + auto& m = held[p]; + for (auto p = m.begin(); p != m.end(); ++p) { if (p->first == id) { if (!recursive) { lockdep_dout(0) << "\n"; *_dout << "recursive lock of " << name << " (" << id << ")\n"; - BackTrace *bt = new BackTrace(BACKTRACE_SKIP); + auto bt = new ceph::BackTrace(BACKTRACE_SKIP); bt->print(*_dout); if (p->second) { *_dout << "\npreviously locked at\n"; @@ -313,7 +311,7 @@ int lockdep_will_lock(const char *name, int id, bool force_backtrace, // did we just create a cycle? if (does_follow(id, p->first)) { - BackTrace *bt = new BackTrace(BACKTRACE_SKIP); + auto bt = new ceph::BackTrace(BACKTRACE_SKIP); lockdep_dout(0) << "new dependency " << lock_names[p->first] << " (" << p->first << ") -> " << name << " (" << id << ")" << " creates a cycle at\n"; @@ -321,9 +319,7 @@ int lockdep_will_lock(const char *name, int id, bool force_backtrace, *_dout << dendl; lockdep_dout(0) << "btw, i am holding these locks:" << dendl; - for (map<int, BackTrace *>::iterator q = m.begin(); - q != m.end(); - ++q) { + for (auto q = m.begin(); q != m.end(); ++q) { lockdep_dout(0) << " " << lock_names[q->first] << " (" << q->first << ")" << dendl; if (q->second) { lockdep_dout(0) << " "; @@ -339,9 +335,9 @@ int lockdep_will_lock(const char *name, int id, bool force_backtrace, ceph_abort(); // actually, we should just die here. } else { - BackTrace *bt = NULL; + ceph::BackTrace* bt = NULL; if (force_backtrace || lockdep_force_backtrace()) { - bt = new BackTrace(BACKTRACE_SKIP); + bt = new ceph::BackTrace(BACKTRACE_SKIP); } follows[p->first][id/8] |= 1 << (id % 8); follows_bt[p->first][id] = bt; @@ -366,7 +362,7 @@ int lockdep_locked(const char *name, int id, bool force_backtrace) lockdep_dout(20) << "_locked " << name << dendl; if (force_backtrace || lockdep_force_backtrace()) - held[p][id] = new BackTrace(BACKTRACE_SKIP); + held[p][id] = new ceph::BackTrace(BACKTRACE_SKIP); else held[p][id] = 0; out: diff --git a/src/common/numa.cc b/src/common/numa.cc index dc80d0f33bd..89368bd4005 100644 --- a/src/common/numa.cc +++ b/src/common/numa.cc @@ -10,6 +10,10 @@ #include "include/stringify.h" #include "common/safe_io.h" +using namespace std::literals; + +using std::set; + // list #if defined(__linux__) diff --git a/src/common/options.cc b/src/common/options.cc index 1354b133fae..f6ac012c608 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -18,6 +18,12 @@ // rbd feature validation #include "librbd/Features.h" +using std::ostream; +using std::ostringstream; + +using ceph::Formatter; +using ceph::parse_timespan; + namespace { class printer : public boost::static_visitor<> { ostream& out; @@ -198,7 +204,7 @@ int Option::parse_value( } else if (type == Option::TYPE_SECS) { try { *out = parse_timespan(val); - } catch (const invalid_argument& e) { + } catch (const std::invalid_argument& e) { *error_message = e.what(); return -EINVAL; } @@ -1736,6 +1742,11 @@ std::vector<Option> get_global_options() { .add_see_also("osd_pool_default_size") .add_see_also("osd_pool_default_min_size"), + Option("mon_allow_pool_size_one", Option::TYPE_BOOL, Option::LEVEL_ADVANCED) + .set_default(false) + .add_service("mon") + .set_description("allow configuring pool with no replicas"), + Option("mon_warn_on_misplaced", Option::TYPE_BOOL, Option::LEVEL_ADVANCED) .set_default(false) .add_service("mgr") @@ -2601,7 +2612,7 @@ std::vector<Option> get_global_options() { Option("osd_erasure_code_plugins", Option::TYPE_STR, Option::LEVEL_ADVANCED) .set_default("jerasure lrc" - #ifdef HAVE_BETTER_YASM_ELF64 + #if defined(HAVE_BETTER_YASM_ELF64) || defined(HAVE_ARMV8_SIMD) " isa" #endif ) diff --git a/src/common/perf_counters.cc b/src/common/perf_counters.cc index 80c96413eb1..420ff928c06 100644 --- a/src/common/perf_counters.cc +++ b/src/common/perf_counters.cc @@ -19,6 +19,8 @@ #include "include/common_fwd.h" using std::ostringstream; +using std::make_pair; +using std::pair; namespace TOPNSPC::common { PerfCountersCollectionImpl::PerfCountersCollectionImpl() @@ -544,13 +546,13 @@ void PerfCountersBuilder::add_u64_counter_histogram( { add_impl(idx, name, description, nick, prio, PERFCOUNTER_U64 | PERFCOUNTER_HISTOGRAM | PERFCOUNTER_COUNTER, unit, - unique_ptr<PerfHistogram<>>{new PerfHistogram<>{x_axis_config, y_axis_config}}); + std::unique_ptr<PerfHistogram<>>{new PerfHistogram<>{x_axis_config, y_axis_config}}); } void PerfCountersBuilder::add_impl( int idx, const char *name, const char *description, const char *nick, int prio, int ty, int unit, - unique_ptr<PerfHistogram<>> histogram) + std::unique_ptr<PerfHistogram<>> histogram) { ceph_assert(idx > m_perf_counters->m_lower_bound); ceph_assert(idx < m_perf_counters->m_upper_bound); diff --git a/src/common/pick_address.cc b/src/common/pick_address.cc index ec464c1b8e1..a2b72371eec 100644 --- a/src/common/pick_address.cc +++ b/src/common/pick_address.cc @@ -34,6 +34,9 @@ #define dout_subsys ceph_subsys_ +using std::string; +using std::vector; + const struct sockaddr *find_ip_in_subnet_list( CephContext *cct, const struct ifaddrs *ifa, @@ -465,7 +468,7 @@ std::string pick_iface(CephContext *cct, const struct sockaddr_storage &network) return {}; } - const unsigned int prefix_len = max(sizeof(in_addr::s_addr), sizeof(in6_addr::s6_addr)) * CHAR_BIT; + const unsigned int prefix_len = std::max(sizeof(in_addr::s_addr), sizeof(in6_addr::s6_addr)) * CHAR_BIT; const struct ifaddrs *found = find_ip_in_subnet( ifa, (const struct sockaddr *) &network, prefix_len); @@ -481,7 +484,7 @@ std::string pick_iface(CephContext *cct, const struct sockaddr_storage &network) } -bool have_local_addr(CephContext *cct, const list<entity_addr_t>& ls, entity_addr_t *match) +bool have_local_addr(CephContext *cct, const std::list<entity_addr_t>& ls, entity_addr_t *match) { struct ifaddrs *ifa; int r = getifaddrs(&ifa); @@ -518,7 +521,7 @@ int get_iface_numa_node( PHY_PORT, BOND_PORT } ifatype = iface_t::PHY_PORT; - string_view ifa{iface}; + std::string_view ifa{iface}; if (auto pos = ifa.find(":"); pos != ifa.npos) { ifa.remove_suffix(ifa.size() - pos); } diff --git a/src/common/rabin.cc b/src/common/rabin.cc index 794627a09aa..658ab372438 100644 --- a/src/common/rabin.cc +++ b/src/common/rabin.cc @@ -1,9 +1,10 @@ // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab +#include <cstring> + #include "include/types.h" #include "rabin.h" -#include <string.h> uint64_t RabinChunk::gen_rabin_hash(char* chunk_data, uint64_t off, uint64_t len) { @@ -35,8 +36,8 @@ bool RabinChunk::end_of_chunk(const uint64_t fp , int numbits) { * output_chunks split by Rabin */ -int RabinChunk::do_rabin_chunks(bufferlist & inputdata, - vector<pair<uint64_t, uint64_t>> & chunks, +int RabinChunk::do_rabin_chunks(ceph::buffer::list& inputdata, + std::vector<std::pair<uint64_t, uint64_t>>& chunks, uint64_t min_val = 0, uint64_t max_val = 0) { char *ptr = inputdata.c_str(); @@ -56,7 +57,7 @@ int RabinChunk::do_rabin_chunks(bufferlist & inputdata, } if (data_size < min) { - chunks.push_back(make_pair(0, data_size)); + chunks.push_back(std::make_pair(0, data_size)); return 0; } @@ -113,7 +114,7 @@ int RabinChunk::do_rabin_chunks(bufferlist & inputdata, } if (store_chunk) { - chunks.push_back(make_pair(c_start, c_size)); + chunks.push_back(std::make_pair(c_start, c_size)); c_start += c_size; c_offset = c_start; start_new_chunk = true; @@ -127,7 +128,7 @@ int RabinChunk::do_rabin_chunks(bufferlist & inputdata, if (c_start < data_size) { c_size = data_size - c_start; - chunks.push_back(make_pair(c_start, c_size)); + chunks.push_back(std::make_pair(c_start, c_size)); } return 0; diff --git a/src/common/rabin.h b/src/common/rabin.h index 30148fea844..6ffaa2bcf92 100644 --- a/src/common/rabin.h +++ b/src/common/rabin.h @@ -15,19 +15,27 @@ #ifndef CEPH_COMMON_RABIN_H_ #define CEPH_COMMON_RABIN_H_ +#include <cstdint> +#include <utility> +#include <vector> + +#include "include/buffer_fwd.h" + class RabinChunk { public: - RabinChunk(uint32_t window_size, uint32_t rabin_prime, - uint64_t mod_prime, uint64_t pow, vector<uint64_t> rabin_mask, uint64_t min, - uint64_t max, uint32_t num_bits): - window_size(window_size), rabin_prime(rabin_prime), mod_prime(mod_prime), - pow(pow), rabin_mask(rabin_mask), min(min), max(max), num_bits(num_bits) {} + RabinChunk(uint32_t window_size, uint32_t rabin_prime, + uint64_t mod_prime, uint64_t pow, std::vector<uint64_t> rabin_mask, + uint64_t min, uint64_t max, uint32_t num_bits): + window_size(window_size), rabin_prime(rabin_prime), + mod_prime(mod_prime), pow(pow), rabin_mask(rabin_mask), min(min), + max(max), num_bits(num_bits) {} RabinChunk() { default_init_rabin_options(); } void default_init_rabin_options() { - vector<uint64_t> _rabin_mask = {0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535}; + std::vector<uint64_t> _rabin_mask = {0,1,3,7,15,31,63,127,255,511,1023,2047, + 4095,8191,16383,32767,65535}; window_size = 48; rabin_prime = 3; mod_prime = 6148914691236517051; @@ -38,8 +46,8 @@ public: rabin_mask = _rabin_mask; } - int do_rabin_chunks(bufferlist & inputdata, - vector<pair<uint64_t, uint64_t>> & chunks, + int do_rabin_chunks(ceph::buffer::list& inputdata, + std::vector<std::pair<uint64_t, uint64_t>>& chunks, uint64_t min, uint64_t max); uint64_t gen_rabin_hash(char* chunk_data, uint64_t off, uint64_t len = 0); bool end_of_chunk(const uint64_t fp , int numbits); @@ -47,10 +55,10 @@ public: void set_rabin_prime(uint32_t r_prime) { rabin_prime = r_prime; } void set_mod_prime(uint64_t m_prime) { mod_prime = m_prime; } void set_pow(uint64_t p) { pow = p; } - void set_rabin_mask(vector<uint64_t> & mask) { rabin_mask = mask; } + void set_rabin_mask(std::vector<uint64_t> & mask) { rabin_mask = mask; } void set_min_chunk(uint32_t c_min) { min = c_min; } void set_max_chunk(uint32_t c_max) { max = c_max; } - int add_rabin_mask(uint64_t mask) { + int add_rabin_mask(uint64_t mask) { rabin_mask.push_back(mask); for (int i = 0; rabin_mask.size(); i++) { if (rabin_mask[i] == mask) { @@ -66,8 +74,8 @@ private: uint32_t window_size; uint32_t rabin_prime; uint64_t mod_prime; - uint64_t pow; - vector<uint64_t> rabin_mask; + uint64_t pow; + std::vector<uint64_t> rabin_mask; uint64_t min; uint64_t max; uint32_t num_bits; diff --git a/src/common/scrub_types.cc b/src/common/scrub_types.cc index d0385138bbd..4b2cfa613d6 100644 --- a/src/common/scrub_types.cc +++ b/src/common/scrub_types.cc @@ -1,5 +1,7 @@ #include "scrub_types.h" +using std::map; + using namespace librados; void object_id_wrapper::encode(bufferlist& bl) const diff --git a/src/common/signal.cc b/src/common/signal.cc index 31e33d46771..edb6aa17aa6 100644 --- a/src/common/signal.cc +++ b/src/common/signal.cc @@ -12,18 +12,23 @@ * */ +#include <cstdlib> +#include <sstream> + +#include <sys/stat.h> +#include <sys/types.h> + +#include <signal.h> + #include "common/BackTrace.h" -#include "common/perf_counters.h" -#include "global/pidfile.h" +#include "common/config.h" #include "common/debug.h" #include "common/signal.h" -#include "common/config.h" +#include "common/perf_counters.h" -#include <signal.h> -#include <sstream> -#include <stdlib.h> -#include <sys/stat.h> -#include <sys/types.h> +#include "global/pidfile.h" + +using namespace std::literals; std::string signal_mask_to_str() { @@ -32,9 +37,9 @@ std::string signal_mask_to_str() return "(pthread_signmask failed)"; } - ostringstream oss; + std::ostringstream oss; oss << "show_signal_mask: { "; - string sep(""); + auto sep = ""s; for (int signum = 0; signum < NSIG; ++signum) { if (sigismember(&old_sigset, signum) == 1) { oss << sep << signum; diff --git a/src/common/snap_types.cc b/src/common/snap_types.cc index 3e33583db16..521404ca2b5 100644 --- a/src/common/snap_types.cc +++ b/src/common/snap_types.cc @@ -1,26 +1,28 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab #include "snap_types.h" #include "common/Formatter.h" -void SnapRealmInfo::encode(bufferlist& bl) const +void SnapRealmInfo::encode(ceph::buffer::list& bl) const { h.num_snaps = my_snaps.size(); h.num_prior_parent_snaps = prior_parent_snaps.size(); using ceph::encode; encode(h, bl); - encode_nohead(my_snaps, bl); - encode_nohead(prior_parent_snaps, bl); + ceph::encode_nohead(my_snaps, bl); + ceph::encode_nohead(prior_parent_snaps, bl); } -void SnapRealmInfo::decode(bufferlist::const_iterator& bl) +void SnapRealmInfo::decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; decode(h, bl); - decode_nohead(h.num_snaps, my_snaps, bl); - decode_nohead(h.num_prior_parent_snaps, prior_parent_snaps, bl); + ceph::decode_nohead(h.num_snaps, my_snaps, bl); + ceph::decode_nohead(h.num_prior_parent_snaps, prior_parent_snaps, bl); } -void SnapRealmInfo::dump(Formatter *f) const +void SnapRealmInfo::dump(ceph::Formatter *f) const { f->dump_unsigned("ino", ino()); f->dump_unsigned("parent", parent()); @@ -29,17 +31,17 @@ void SnapRealmInfo::dump(Formatter *f) const f->dump_unsigned("created", created()); f->open_array_section("snaps"); - for (vector<snapid_t>::const_iterator p = my_snaps.begin(); p != my_snaps.end(); ++p) + for (auto p = my_snaps.begin(); p != my_snaps.end(); ++p) f->dump_unsigned("snap", *p); f->close_section(); f->open_array_section("prior_parent_snaps"); - for (vector<snapid_t>::const_iterator p = prior_parent_snaps.begin(); p != prior_parent_snaps.end(); ++p) + for (auto p = prior_parent_snaps.begin(); p != prior_parent_snaps.end(); ++p) f->dump_unsigned("snap", *p); - f->close_section(); + f->close_section(); } -void SnapRealmInfo::generate_test_instances(list<SnapRealmInfo*>& o) +void SnapRealmInfo::generate_test_instances(std::list<SnapRealmInfo*>& o) { o.push_back(new SnapRealmInfo); o.push_back(new SnapRealmInfo(1, 10, 10, 0)); @@ -74,19 +76,19 @@ bool SnapContext::is_valid() const return true; } -void SnapContext::dump(Formatter *f) const +void SnapContext::dump(ceph::Formatter *f) const { f->dump_unsigned("seq", seq); f->open_array_section("snaps"); - for (vector<snapid_t>::const_iterator p = snaps.begin(); p != snaps.end(); ++p) + for (auto p = snaps.cbegin(); p != snaps.cend(); ++p) f->dump_unsigned("snap", *p); f->close_section(); } -void SnapContext::generate_test_instances(list<SnapContext*>& o) +void SnapContext::generate_test_instances(std::list<SnapContext*>& o) { o.push_back(new SnapContext); - vector<snapid_t> v; + std::vector<snapid_t> v; o.push_back(new SnapContext(10, v)); v.push_back(18); v.push_back(3); diff --git a/src/common/types.cc b/src/common/types.cc index 36861329242..7f11cd798fb 100644 --- a/src/common/types.cc +++ b/src/common/types.cc @@ -24,7 +24,7 @@ const shard_id_t shard_id_t::NO_SHARD(-1); -ostream &operator<<(ostream &lhs, const shard_id_t &rhs) +std::ostream& operator<<(std::ostream& lhs, const shard_id_t& rhs) { return lhs << (unsigned)(uint8_t)rhs.id; } diff --git a/src/common/util.cc b/src/common/util.cc index f816ff41db0..b4846328ce1 100644 --- a/src/common/util.cc +++ b/src/common/util.cc @@ -39,6 +39,13 @@ #include <stdio.h> +using std::list; +using std::map; +using std::string; + +using ceph::bufferlist; +using ceph::Formatter; + int get_fs_stats(ceph_data_stats_t &stats, const char *path) { if (!path) @@ -72,7 +79,7 @@ static char* value_sanitize(char *value) } static bool value_set(char *buf, const char *prefix, - map<string, string> *pm, const char *key) + map<string, string> *pm, const char *key) { if (strncmp(buf, prefix, strlen(prefix))) { return false; @@ -287,12 +294,12 @@ void dump_services(Formatter* f, const map<string, list<int> >& services, const ceph_assert(f); f->open_object_section(type); - for (map<string, list<int> >::const_iterator host = services.begin(); + for (auto host = services.begin(); host != services.end(); ++host) { f->open_array_section(host->first.c_str()); const list<int>& hosted = host->second; - for (list<int>::const_iterator s = hosted.begin(); - s != hosted.end(); ++s) { + for (auto s = hosted.cbegin(); + s != hosted.cend(); ++s) { f->dump_int(type, *s); } f->close_section(); diff --git a/src/compressor/zlib/CMakeLists.txt b/src/compressor/zlib/CMakeLists.txt index 51aba0834d3..346f37137ce 100644 --- a/src/compressor/zlib/CMakeLists.txt +++ b/src/compressor/zlib/CMakeLists.txt @@ -4,31 +4,42 @@ if(HAVE_INTEL_SSE4_1 AND HAVE_BETTER_YASM_ELF64 AND (NOT APPLE)) set(zlib_sources CompressionPluginZlib.cc ZlibCompressor.cc - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/crc32_gzip.asm - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/crc32_gzip_base.c - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/detect_repeated_char.asm - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/encode_df.c - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/encode_df_04.asm - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/flatten_ll.c - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/huff_codes.c - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/hufftables_c.c - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip.c ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip.c + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/hufftables_c.c ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_base.c - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_body_01.asm - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_body_02.asm - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_body_04.asm - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_finish.asm ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_icf_base.c - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_icf_body_01.asm - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_icf_body_02.asm - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_icf_body_04.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/adler32_base.c + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/flatten_ll.c + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/encode_df.c + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_icf_body.c + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_inflate.c + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/huff_codes.c + ${CMAKE_SOURCE_DIR}/src/isa-l/crc/crc_base_aliases.c + ${CMAKE_SOURCE_DIR}/src/isa-l/crc/crc_base.c + ${CMAKE_SOURCE_DIR}/src/isa-l/crc/crc64_base.c + ) + list(APPEND zlib_sources + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_body.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_finish.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_icf_body_h1_gr_bt.asm ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_icf_finish.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/rfc1951_lookup.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/adler32_sse.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/adler32_avx2_4.asm ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_multibinary.asm ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_update_histogram_01.asm ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_update_histogram_04.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_decode_block_stateless_01.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_decode_block_stateless_04.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_inflate_multibinary.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/encode_df_04.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/encode_df_06.asm ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/proc_heap.asm - ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/rfc1951_lookup.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_deflate_hash.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_gen_icf_map_lh1_06.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_gen_icf_map_lh1_04.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_set_long_icf_fg_04.asm + ${CMAKE_SOURCE_DIR}/src/isa-l/igzip/igzip_set_long_icf_fg_06.asm ) else(HAVE_INTEL_SSE4_1 AND HAVE_BETTER_YASM_ELF64 AND (NOT APPLE)) set(zlib_sources diff --git a/src/crimson/CMakeLists.txt b/src/crimson/CMakeLists.txt index 224deb55de9..e29bb98b378 100644 --- a/src/crimson/CMakeLists.txt +++ b/src/crimson/CMakeLists.txt @@ -14,10 +14,11 @@ set_target_properties(crimson::cflags PROPERTIES set(crimson_common_srcs admin/admin_socket.cc admin/osd_admin.cc + common/assert.cc common/buffer_io.cc common/config_proxy.cc + common/formatter.cc common/perf_counters_collection.cc - common/assert.cc common/log.cc) # the specialized version of ceph-common, where diff --git a/src/crimson/admin/admin_socket.cc b/src/crimson/admin/admin_socket.cc index 1c677ff1079..307ea6b033a 100644 --- a/src/crimson/admin/admin_socket.cc +++ b/src/crimson/admin/admin_socket.cc @@ -12,6 +12,8 @@ #include <seastar/util/std-compat.hh> #include "common/version.h" +#include "messages/MCommand.h" +#include "messages/MCommandReply.h" #include "crimson/common/log.h" #include "crimson/net/Socket.h" @@ -32,6 +34,19 @@ seastar::logger& logger() namespace crimson::admin { +tell_result_t::tell_result_t(int ret, std::string&& err) + : ret{ret}, err(std::move(err)) +{} + +tell_result_t::tell_result_t(int ret, std::string&& err, ceph::bufferlist&& out) + : ret{ret}, err(std::move(err)), out(std::move(out)) +{} + +tell_result_t::tell_result_t(Formatter* formatter) +{ + formatter->flush(out); +} + seastar::future<> AdminSocket::register_command(std::unique_ptr<AdminSocketHook>&& hook) { @@ -51,28 +66,29 @@ AdminSocket::register_command(std::unique_ptr<AdminSocketHook>&& hook) /* * Note: parse_cmd() is executed with servers_tbl_rwlock held as shared */ -AdminSocket::maybe_parsed_t AdminSocket::parse_cmd(std::string cmd, - ceph::bufferlist& out) +auto AdminSocket::parse_cmd(const std::vector<std::string>& cmd) + -> std::variant<parsed_command_t, tell_result_t> { // preliminaries: // - create the formatter specified by the cmd parameters // - locate the "op-code" string (the 'prefix' segment) // - prepare for command parameters extraction via cmdmap_t cmdmap_t cmdmap; + ceph::bufferlist out; try { stringstream errss; // note that cmdmap_from_json() may throw on syntax issues - if (!cmdmap_from_json({cmd}, &cmdmap, errss)) { + if (!cmdmap_from_json(cmd, &cmdmap, errss)) { logger().error("{}: incoming command error: {}", __func__, errss.str()); out.append("error:"s); out.append(errss.str()); - return maybe_parsed_t{ std::nullopt }; + return tell_result_t{-EINVAL, "invalid json", std::move(out)}; } - } catch (std::runtime_error& e) { + } catch (const std::runtime_error& e) { logger().error("{}: incoming command syntax: {}", __func__, cmd); - out.append("error: command syntax"s); - return maybe_parsed_t{ std::nullopt }; + out.append(string{e.what()}); + return tell_result_t{-EINVAL, "invalid json", std::move(out)}; } string format; @@ -82,43 +98,17 @@ AdminSocket::maybe_parsed_t AdminSocket::parse_cmd(std::string cmd, cmd_getval(cmdmap, "prefix", prefix); } catch (const bad_cmd_get& e) { logger().error("{}: invalid syntax: {}", __func__, cmd); - out.append("error: command syntax: missing 'prefix'"s); - return maybe_parsed_t{ std::nullopt }; - } - - if (prefix.empty()) { - // no command identified - out.append("error: no command identified"s); - return maybe_parsed_t{ std::nullopt }; + out.append(string{e.what()}); + return tell_result_t{-EINVAL, "invalid json", std::move(out)}; } // match the incoming op-code to one of the registered APIs if (auto found = hooks.find(prefix); found != hooks.end()) { return parsed_command_t{ cmdmap, format, *found->second }; } else { - return maybe_parsed_t{ std::nullopt }; - } -} - -/* - * Note: validate_command() is executed with servers_tbl_rwlock held as shared - */ -bool AdminSocket::validate_command(const parsed_command_t& parsed, - const std::string& command_text, - ceph::bufferlist& out) const -{ - logger().info("{}: validating {} against:{}", __func__, command_text, - parsed.hook.desc); - - stringstream os; // for possible validation error messages - if (validate_cmd(nullptr, std::string{parsed.hook.desc}, parsed.parameters, os)) { - return true; - } else { - os << "error: command validation failure "; - logger().error("{}: validation failure (incoming:{}) {}", __func__, - command_text, os.str()); - out.append(os); - return false; + return tell_result_t{-EINVAL, + fmt::format("unknown command '{}'", prefix), + std::move(out)}; } } @@ -136,25 +126,56 @@ seastar::future<> AdminSocket::finalize_response( .then([&out, outbuf_cont] { return out.write(outbuf_cont.c_str()); }); } + +seastar::future<> AdminSocket::handle_command(crimson::net::Connection* conn, + boost::intrusive_ptr<MCommand> m) +{ + return execute_command(m->cmd, std::move(m->get_data())).then( + [conn, tid=m->get_tid(), this](auto result) { + auto [ret, err, out] = std::move(result); + auto reply = make_message<MCommandReply>(ret, err); + reply->set_tid(tid); + reply->set_data(out); + return conn->send(reply); + }); +} + seastar::future<> AdminSocket::execute_line(std::string cmdline, seastar::output_stream<char>& out) { + return execute_command({cmdline}, {}).then([&out, this](auto result) { + auto [ret, stderr, stdout] = std::move(result); + if (ret < 0) { + stdout.append(fmt::format("ERROR: {}\n", cpp_strerror(ret))); + stdout.append(stderr); + } + return finalize_response(out, std::move(stdout)); + }); +} + +auto AdminSocket::execute_command(const std::vector<std::string>& cmd, + ceph::bufferlist&& buf) + -> seastar::future<tell_result_t> +{ return seastar::with_shared(servers_tbl_rwlock, - [this, cmdline, &out]() mutable { - ceph::bufferlist err; - auto parsed = parse_cmd(cmdline, err); - if (!parsed.has_value() || - !validate_command(*parsed, cmdline, err)) { - return finalize_response(out, std::move(err)); + [cmd, buf=std::move(buf), this]() mutable { + auto maybe_parsed = parse_cmd(cmd); + if (auto parsed = std::get_if<parsed_command_t>(&maybe_parsed); parsed) { + stringstream os; + string desc{parsed->hook.desc}; + if (!validate_cmd(nullptr, desc, parsed->params, os)) { + logger().error("AdminSocket::execute_command: " + "failed to validate '{}': {}", cmd, os.str()); + ceph::bufferlist out; + out.append(os); + return seastar::make_ready_future<tell_result_t>( + tell_result_t{-EINVAL, "invalid command json", std::move(out)}); + } + return parsed->hook.call(parsed->params, parsed->format, std::move(buf)); + } else { + auto& result = std::get<tell_result_t>(maybe_parsed); + return seastar::make_ready_future<tell_result_t>(std::move(result)); } - return parsed->hook.call(parsed->hook.prefix, - parsed->format, - parsed->parameters).then( - [this, &out](auto result) { - // add 'failed' to the contents of out_buf? not what - // happens in the old code - return finalize_response(out, std::move(result)); - }); }); } @@ -199,8 +220,7 @@ seastar::future<> AdminSocket::handle_client(seastar::input_stream<char>& in, return in.close(); }).handle_exception([](auto ep) { logger().debug("exception on {}: {}", __func__, ep); - return seastar::make_ready_future<>(); - }).discard_result(); + }); } seastar::future<> AdminSocket::start(const std::string& path) @@ -215,7 +235,7 @@ seastar::future<> AdminSocket::start(const std::string& path) auto sock_path = seastar::socket_address{ seastar::unix_domain_addr{ path } }; server_sock = seastar::engine().listen(sock_path); // listen in background - std::ignore = seastar::do_until( + task = seastar::do_until( [this] { return stop_gate.is_closed(); }, [this] { return seastar::with_gate(stop_gate, [this] { @@ -236,11 +256,7 @@ seastar::future<> AdminSocket::start(const std::string& path) } }); }); - }).then([] { - logger().debug("AdminSocket::init(): admin-sock thread terminated"); - return seastar::now(); }); - return seastar::make_ready_future<>(); } @@ -250,13 +266,17 @@ seastar::future<> AdminSocket::stop() return seastar::now(); } server_sock->abort_accept(); - server_sock.reset(); if (connected_sock) { connected_sock->shutdown_input(); connected_sock->shutdown_output(); - connected_sock.reset(); } - return stop_gate.close(); + return stop_gate.close().then([this] { + assert(task.has_value()); + return task->then([] { + logger().info("AdminSocket: stopped"); + return seastar::now(); + }); + }); } ///////////////////////////////////////// @@ -268,9 +288,9 @@ class VersionHook final : public AdminSocketHook { VersionHook() : AdminSocketHook{"version", "version", "get ceph version"} {} - seastar::future<bufferlist> call(std::string_view, - std::string_view format, - const cmdmap_t&) const final + seastar::future<tell_result_t> call(const cmdmap_t&, + std::string_view format, + ceph::bufferlist&&) const final { unique_ptr<Formatter> f{Formatter::create(format, "json-pretty", "json-pretty")}; f->open_object_section("version"); @@ -278,9 +298,7 @@ class VersionHook final : public AdminSocketHook { f->dump_string("release", ceph_release_to_str()); f->dump_string("release_type", ceph_release_type()); f->close_section(); - bufferlist out; - f->flush(out); - return seastar::make_ready_future<bufferlist>(std::move(out)); + return seastar::make_ready_future<tell_result_t>(f.get()); } }; @@ -293,17 +311,15 @@ class GitVersionHook final : public AdminSocketHook { GitVersionHook() : AdminSocketHook{"git_version", "git_version", "get git sha1"} {} - seastar::future<bufferlist> call(std::string_view command, - std::string_view format, - const cmdmap_t&) const final + seastar::future<tell_result_t> call(const cmdmap_t&, + std::string_view format, + ceph::bufferlist&&) const final { unique_ptr<Formatter> f{Formatter::create(format, "json-pretty", "json-pretty")}; f->open_object_section("version"); f->dump_string("git_version", git_version_to_str()); f->close_section(); - ceph::bufferlist out; - f->flush(out); - return seastar::make_ready_future<bufferlist>(std::move(out)); + return seastar::make_ready_future<tell_result_t>(f.get()); } }; @@ -316,12 +332,12 @@ class HelpHook final : public AdminSocketHook { m_as{as} {} - seastar::future<bufferlist> call(std::string_view command, - std::string_view format, - const cmdmap_t& cmdmap) const final + seastar::future<tell_result_t> call(const cmdmap_t&, + std::string_view format, + ceph::bufferlist&&) const final { return seastar::with_shared(m_as.servers_tbl_rwlock, - [this, format] { + [format, this] { unique_ptr<Formatter> f{Formatter::create(format, "json-pretty", "json-pretty")}; f->open_object_section("help"); for (const auto& [prefix, hook] : m_as) { @@ -330,9 +346,7 @@ class HelpHook final : public AdminSocketHook { } } f->close_section(); - ceph::bufferlist out; - f->flush(out); - return seastar::make_ready_future<bufferlist>(std::move(out)); + return seastar::make_ready_future<tell_result_t>(f.get()); }); } }; @@ -347,12 +361,12 @@ class GetdescsHook final : public AdminSocketHook { "list available commands"}, m_as{ as } {} - seastar::future<bufferlist> call(std::string_view command, - std::string_view format, - const cmdmap_t& cmdmap) const final + seastar::future<tell_result_t> call(const cmdmap_t& cmdmap, + std::string_view format, + ceph::bufferlist&&) const final { - unique_ptr<Formatter> f{Formatter::create(format, "json-pretty", "json-pretty")}; - return seastar::with_shared(m_as.servers_tbl_rwlock, [this, f=move(f)] { + return seastar::with_shared(m_as.servers_tbl_rwlock, [format, this] { + unique_ptr<Formatter> f{Formatter::create(format, "json-pretty", "json-pretty")}; int cmdnum = 0; f->open_object_section("command_descriptions"); for (const auto& [prefix, hook] : m_as) { @@ -363,9 +377,7 @@ class GetdescsHook final : public AdminSocketHook { cmdnum++; } f->close_section(); - ceph::bufferlist out; - f->flush(out); - return seastar::make_ready_future<bufferlist>(std::move(out)); + return seastar::make_ready_future<tell_result_t>(f.get()); }); } }; diff --git a/src/crimson/admin/admin_socket.h b/src/crimson/admin/admin_socket.h index 4b57b68ad40..f2c10621ea7 100644 --- a/src/crimson/admin/admin_socket.h +++ b/src/crimson/admin/admin_socket.h @@ -19,25 +19,36 @@ #include <seastar/net/api.hh> #include "common/cmdparse.h" +#include "include/buffer.h" +#include "crimson/net/Fwd.h" using namespace std::literals; +class MCommand; + namespace crimson::admin { class AdminSocket; +struct tell_result_t { + int ret = 0; + std::string err; + ceph::bufferlist out; + tell_result_t() = default; + tell_result_t(int ret, std::string&& err); + tell_result_t(int ret, std::string&& err, ceph::bufferlist&& out); + /** + * create a \c tell_result_t indicating the successful completion + * of command + * + * \param formatter the content of formatter will be flushed to the + * output buffer + */ + tell_result_t(Formatter* formatter); +}; + /** - * A specific hook must implement exactly one of the two interfaces: - * (1) call(command, cmdmap, format, out) - * or - * (2) exec_command(formatter, command, cmdmap, format, out) - * - * The default implementation of (1) above calls exec_command() after handling - * most of the boiler-plate choirs: - * - setting up the formatter, with an appropiate 'section' already opened; - * - handling possible failures (exceptions or future_exceptions) returned - * by (2) - * - flushing the output to the outgoing bufferlist. + * An abstract class to be inherited by implementations of asock hooks */ class AdminSocketHook { public: @@ -47,12 +58,21 @@ class AdminSocketHook { prefix{prefix}, desc{desc}, help{help} {} /** - * \retval 'false' for hook execution errors + * handle command defined by cmdmap + * + * \param cmdmap dictionary holding the named parameters + * \param format the expected format of the output + * \param input the binary input of the command + * \pre \c cmdmap should be validated with \c desc + * \retval an instance of \c tell_result_t + * \note a negative \c ret should be set to indicate that the hook fails to + * fulfill the command either because of an invalid input or other + * failures. in that case, a brief reason of the failure should + * noted in \c err in the returned value */ - virtual seastar::future<ceph::bufferlist> - call(std::string_view command, - std::string_view format, - const cmdmap_t& cmdmap) const = 0; + virtual seastar::future<tell_result_t> call(const cmdmap_t& cmdmap, + std::string_view format, + ceph::bufferlist&& input) const = 0; virtual ~AdminSocketHook() {} const std::string_view prefix; const std::string_view desc; @@ -80,9 +100,7 @@ class AdminSocket : public seastar::enable_lw_shared_from_this<AdminSocket> { seastar::future<> stop(); /** - * register an admin socket hooks server - * - * The server registers a set of APIs under a common hook_server_tag. + * register an admin socket hook * * Commands (APIs) are registered under a command string. Incoming * commands are split by spaces and matched against the longest @@ -90,19 +108,11 @@ class AdminSocket : public seastar::enable_lw_shared_from_this<AdminSocket> { * registered, and an incoming command is 'foo bar baz', it is * matched with 'foo bar', while 'foo fud' will match 'foo'. * - * The entire incoming command string is passed to the registered - * hook. - * - * \param server_tag a tag identifying the server registering the hook - * \param apis_served a vector of the commands served by this server. Each - * command registration includes its identifying command string, the + * \param hook a hook which includes its identifying command string, the * expected call syntax, and some help text. * * A note regarding the help text: if empty, command will not be * included in 'help' output. - * - * \retval a shared ptr to the asok server itself, or nullopt if - * a block with same tag is already registered. */ seastar::future<> register_command(std::unique_ptr<AdminSocketHook>&& hook); @@ -110,20 +120,26 @@ class AdminSocket : public seastar::enable_lw_shared_from_this<AdminSocket> { * Registering the APIs that are served directly by the admin_socket server. */ seastar::future<> register_admin_commands(); + /** + * handle a command message by replying an MCommandReply with the same tid + * + * \param conn connection over which the incoming command message is received + * \param m message carrying the command vector and optional input buffer + */ + seastar::future<> handle_command(crimson::net::Connection* conn, + boost::intrusive_ptr<MCommand> m); - private: +private: /** * the result of analyzing an incoming command, and locating it in * the registered APIs collection. */ struct parsed_command_t { - cmdmap_t parameters; + cmdmap_t params; std::string format; const AdminSocketHook& hook; }; // and the shorthand: - using maybe_parsed_t = std::optional<AdminSocket::parsed_command_t>; - seastar::future<> handle_client(seastar::input_stream<char>& inp, seastar::output_stream<char>& out); @@ -133,10 +149,10 @@ class AdminSocket : public seastar::enable_lw_shared_from_this<AdminSocket> { seastar::future<> finalize_response(seastar::output_stream<char>& out, ceph::bufferlist&& msgs); - bool validate_command(const parsed_command_t& parsed, - const std::string& command_text, - ceph::bufferlist& out) const; + seastar::future<tell_result_t> execute_command(const std::vector<std::string>& cmd, + ceph::bufferlist&& buf); + std::optional<seastar::future<>> task; std::optional<seastar::server_socket> server_sock; std::optional<seastar::connected_socket> connected_sock; @@ -146,11 +162,16 @@ class AdminSocket : public seastar::enable_lw_shared_from_this<AdminSocket> { seastar::gate stop_gate; /** - * parse the incoming command line into the sequence of words that identifies - * the API, and into its arguments. Locate the command string in the - * registered blocks. + * parse the incoming command vector, find a registered hook by looking up by + * its prefix, perform sanity checks on the parsed parameters with the hook's + * command description + * + * \param cmd a vector of string which presents a command + * \retval on success, a \c parsed_command_t is returned, tell_result_t with + * detailed error messages is returned otherwise */ - maybe_parsed_t parse_cmd(std::string command_text, bufferlist& out); + std::variant<parsed_command_t, tell_result_t> + parse_cmd(const std::vector<std::string>& cmd); /** * The servers table is protected by a rw-lock, to be acquired exclusively diff --git a/src/crimson/admin/osd_admin.cc b/src/crimson/admin/osd_admin.cc index 13f096e3ec6..a8e0a475363 100644 --- a/src/crimson/admin/osd_admin.cc +++ b/src/crimson/admin/osd_admin.cc @@ -19,13 +19,6 @@ using crimson::osd::OSD; using namespace crimson::common; -namespace { -seastar::logger& logger() -{ - return crimson::get_logger(ceph_subsys_osd); -} -} // namespace - namespace crimson::admin { using crimson::common::local_conf; @@ -36,57 +29,24 @@ std::unique_ptr<AdminSocketHook> make_asok_hook(Args&&... args) return std::make_unique<Hook>(std::forward<Args>(args)...); } -class OsdAdminHookBase : public AdminSocketHook { -protected: - OsdAdminHookBase(std::string_view prefix, - std::string_view desc, - std::string_view help) - : AdminSocketHook(prefix, desc, help) {} - struct tell_result_t { - int ret = 0; - std::string err; - }; - /// the specific command implementation - virtual seastar::future<tell_result_t> tell(const cmdmap_t& cmdmap, - Formatter* f) const = 0; - seastar::future<bufferlist> call(std::string_view prefix, - std::string_view format, - const cmdmap_t& cmdmap) const final - { - unique_ptr<Formatter> f{Formatter::create(format, "json-pretty", "json-pretty")}; - auto ret = seastar::do_with(std::move(f), [cmdmap, this] (auto& f) { - Formatter* formatter = f.get(); - return tell(cmdmap, formatter).then([formatter](auto result) { - bufferlist out; - if (auto& [ret, err] = result; ret < 0) { - out.append(fmt::format("ERROR: {}\n", cpp_strerror(ret))); - out.append(err); - } else { - formatter->flush(out); - } - return seastar::make_ready_future<bufferlist>(std::move(out)); - }); - }); - return ret; - } -}; - /** * An OSD admin hook: OSD status */ -class OsdStatusHook : public OsdAdminHookBase { +class OsdStatusHook : public AdminSocketHook { public: explicit OsdStatusHook(crimson::osd::OSD& osd) : - OsdAdminHookBase("status", "status", "OSD status"), + AdminSocketHook("status", "status", "OSD status"), osd(osd) {} - seastar::future<tell_result_t> tell(const cmdmap_t&, - Formatter* f) const final + seastar::future<tell_result_t> call(const cmdmap_t&, + std::string_view format, + ceph::bufferlist&& input) const final { + unique_ptr<Formatter> f{Formatter::create(format, "json-pretty", "json-pretty")}; f->open_object_section("status"); - osd.dump_status(f); + osd.dump_status(f.get()); f->close_section(); - return seastar::make_ready_future<tell_result_t>(); + return seastar::make_ready_future<tell_result_t>(f.get()); } private: crimson::osd::OSD& osd; @@ -97,15 +57,17 @@ make_asok_hook<OsdStatusHook>(crimson::osd::OSD& osd); /** * An OSD admin hook: send beacon */ -class SendBeaconHook : public OsdAdminHookBase { +class SendBeaconHook : public AdminSocketHook { public: explicit SendBeaconHook(crimson::osd::OSD& osd) : - OsdAdminHookBase("send_beacon", - "send_beacon", - "send OSD beacon to mon immediately"), - osd(osd) + AdminSocketHook("send_beacon", + "send_beacon", + "send OSD beacon to mon immediately"), + osd(osd) {} - seastar::future<tell_result_t> tell(const cmdmap_t&, Formatter*) const final + seastar::future<tell_result_t> call(const cmdmap_t&, + std::string_view format, + ceph::bufferlist&& input) const final { return osd.send_beacon().then([] { return seastar::make_ready_future<tell_result_t>(); @@ -120,19 +82,22 @@ make_asok_hook<SendBeaconHook>(crimson::osd::OSD& osd); /** * A CephContext admin hook: listing the configuration values */ -class ConfigShowHook : public OsdAdminHookBase { +class ConfigShowHook : public AdminSocketHook { public: explicit ConfigShowHook() : - OsdAdminHookBase("config show", + AdminSocketHook("config show", "config show", "dump current config settings") {} - seastar::future<tell_result_t> tell(const cmdmap_t&, Formatter* f) const final + seastar::future<tell_result_t> call(const cmdmap_t&, + std::string_view format, + ceph::bufferlist&& input) const final { + unique_ptr<Formatter> f{Formatter::create(format, "json-pretty", "json-pretty")}; f->open_object_section("config_show"); - local_conf().show_config(f); + local_conf().show_config(f.get()); f->close_section(); - return seastar::make_ready_future<tell_result_t>(); + return seastar::make_ready_future<tell_result_t>(f.get()); } }; template std::unique_ptr<AdminSocketHook> make_asok_hook<ConfigShowHook>(); @@ -141,15 +106,16 @@ template std::unique_ptr<AdminSocketHook> make_asok_hook<ConfigShowHook>(); * A CephContext admin hook: fetching the value of a specific * configuration item */ -class ConfigGetHook : public OsdAdminHookBase { +class ConfigGetHook : public AdminSocketHook { public: ConfigGetHook() : - OsdAdminHookBase("config get", + AdminSocketHook("config get", "config get name=var,type=CephString", "config get <field>: get the config value") {} - seastar::future<tell_result_t> tell(const cmdmap_t& cmdmap, - ceph::Formatter* f) const final + seastar::future<tell_result_t> call(const cmdmap_t& cmdmap, + std::string_view format, + ceph::bufferlist&& input) const final { std::string var; if (!cmd_getval(cmdmap, "var", var)) { @@ -158,12 +124,13 @@ public: tell_result_t{-EINVAL, "syntax error: 'config get <var>'"}); } try { + unique_ptr<Formatter> f{Formatter::create(format, "json-pretty", "json-pretty")}; f->open_object_section("config_get"); std::string conf_val = local_conf().get_val<std::string>(var); f->dump_string(var.c_str(), conf_val.c_str()); f->close_section(); - return seastar::make_ready_future<tell_result_t>(); + return seastar::make_ready_future<tell_result_t>(f.get()); } catch (const boost::bad_get&) { return seastar::make_ready_future<tell_result_t>( tell_result_t{-EINVAL, fmt::format("unrecognized option {}", var)}); @@ -177,15 +144,16 @@ template std::unique_ptr<AdminSocketHook> make_asok_hook<ConfigGetHook>(); * item (a real example: {"prefix": "config set", "var":"debug_osd", "val": * ["30/20"]} ) */ -class ConfigSetHook : public OsdAdminHookBase { +class ConfigSetHook : public AdminSocketHook { public: ConfigSetHook() : - OsdAdminHookBase("config set", + AdminSocketHook("config set", "config set name=var,type=CephString name=val,type=CephString,n=N", "config set <field> <val> [<val> ...]: set a config variable") {} - seastar::future<tell_result_t> tell(const cmdmap_t& cmdmap, - ceph::Formatter* f) const final + seastar::future<tell_result_t> call(const cmdmap_t& cmdmap, + std::string_view format, + ceph::bufferlist&&) const final { std::string var; std::vector<std::string> new_val; @@ -196,11 +164,12 @@ public: } // val may be multiple words string valstr = str_join(new_val, " "); - return local_conf().set_val(var, valstr).then([f] { + return local_conf().set_val(var, valstr).then([format] { + unique_ptr<Formatter> f{Formatter::create(format, "json-pretty", "json-pretty")}; f->open_object_section("config_set"); f->dump_string("success", ""); f->close_section(); - return seastar::make_ready_future<tell_result_t>(); + return seastar::make_ready_future<tell_result_t>(f.get()); }).handle_exception_type([](std::invalid_argument& e) { return seastar::make_ready_future<tell_result_t>( tell_result_t{-EINVAL, e.what()}); @@ -213,15 +182,16 @@ template std::unique_ptr<AdminSocketHook> make_asok_hook<ConfigSetHook>(); * A CephContext admin hook: calling assert (if allowed by * 'debug_asok_assert_abort') */ -class AssertAlwaysHook : public OsdAdminHookBase { +class AssertAlwaysHook : public AdminSocketHook { public: AssertAlwaysHook() : - OsdAdminHookBase("assert", + AdminSocketHook("assert", "assert", "asserts") {} - seastar::future<tell_result_t> tell(const cmdmap_t&, - ceph::Formatter*) const final + seastar::future<tell_result_t> call(const cmdmap_t&, + std::string_view format, + ceph::bufferlist&& input) const final { if (local_conf().get_val<bool>("debug_asok_assert_abort")) { ceph_assert_always(0); diff --git a/src/crimson/common/formatter.cc b/src/crimson/common/formatter.cc new file mode 100644 index 00000000000..677216224ee --- /dev/null +++ b/src/crimson/common/formatter.cc @@ -0,0 +1,64 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + +#include "formatter.h" + +#include <fmt/format.h> +#if FMT_VERSION >= 60000 +#include <fmt/chrono.h> +#else +#include <fmt/time.h> +#endif + + +template <> +struct fmt::formatter<seastar::lowres_system_clock::time_point> { + // ignore the format string + template <typename ParseContext> + constexpr auto parse(ParseContext &ctx) { return ctx.begin(); } + + template <typename FormatContext> + auto format(const seastar::lowres_system_clock::time_point& t, + FormatContext& ctx) { + std::time_t tt = std::chrono::duration_cast<std::chrono::seconds>( + t.time_since_epoch()).count(); + auto milliseconds = (t.time_since_epoch() % + std::chrono::seconds(1)).count(); + return fmt::format_to(ctx.out(), "{:%Y-%m-%d %H:%M:%S} {:03d}", + fmt::localtime(tt), milliseconds); + } +}; + +template <> +struct fmt::formatter<ceph::coarse_real_clock::time_point> { + // ignore the format string + template <typename ParseContext> + constexpr auto parse(ParseContext &ctx) { return ctx.begin(); } + + template <typename FormatContext> + auto format(const ceph::coarse_real_clock::time_point& t, + FormatContext& ctx) { + std::time_t tt = std::chrono::duration_cast<std::chrono::seconds>( + t.time_since_epoch()).count(); + auto milliseconds = (t.time_since_epoch() % + std::chrono::seconds(1)).count(); + return fmt::format_to(ctx.out(), "{:%Y-%m-%d %H:%M:%S} {:03d}", + fmt::localtime(tt), milliseconds); + } +}; + +namespace std { + +ostream& operator<<(ostream& out, + const seastar::lowres_system_clock::time_point& t) +{ + return out << fmt::format("{}", t); +} + +ostream& operator<<(ostream& out, + const ceph::coarse_real_clock::time_point& t) +{ + return out << fmt::format("{}", t); +} + +} diff --git a/src/crimson/common/formatter.h b/src/crimson/common/formatter.h new file mode 100644 index 00000000000..1775b0954f4 --- /dev/null +++ b/src/crimson/common/formatter.h @@ -0,0 +1,15 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab + +#include <seastar/core/lowres_clock.hh> + +#include "common/ceph_time.h" + +namespace std { + +ostream& operator<<(ostream& out, + const seastar::lowres_system_clock::time_point& t); +ostream& operator<<(ostream& out, + const ceph::coarse_real_clock::time_point& t); + +} diff --git a/src/crimson/mgr/client.cc b/src/crimson/mgr/client.cc index 60fbfdf6836..9134c260213 100644 --- a/src/crimson/mgr/client.cc +++ b/src/crimson/mgr/client.cc @@ -3,6 +3,8 @@ #include "client.h" +#include <seastar/core/sleep.hh> + #include "crimson/common/log.h" #include "crimson/net/Connection.h" #include "crimson/net/Messenger.h" @@ -26,7 +28,7 @@ Client::Client(crimson::net::Messenger& msgr, WithStats& with_stats) : msgr{msgr}, with_stats{with_stats}, - tick_timer{[this] {tick();}} + report_timer{[this] {report();}} {} seastar::future<> Client::start() @@ -38,9 +40,7 @@ seastar::future<> Client::stop() { return gate.close().then([this] { if (conn) { - return conn->close(); - } else { - return seastar::now(); + conn->mark_down(); } }); } @@ -58,31 +58,46 @@ seastar::future<> Client::ms_dispatch(crimson::net::Connection* conn, } } +seastar::future<> Client::ms_handle_connect(crimson::net::ConnectionRef c) +{ + if (conn == c) { + // ask for the mgrconfigure message + auto m = ceph::make_message<MMgrOpen>(); + m->daemon_name = local_conf()->name.get_id(); + return conn->send(std::move(m)); + } else { + return seastar::now(); + } +} + seastar::future<> Client::ms_handle_reset(crimson::net::ConnectionRef c) { if (conn == c) { - conn = nullptr; - tick_timer.cancel(); + report_timer.cancel(); + return reconnect(); + } else { + return seastar::now(); } - return seastar::now(); } seastar::future<> Client::reconnect() { if (conn) { - // crimson::net::Protocol::close() is able to close() in background - (void)conn->close(); + conn->mark_down(); + conn = {}; } if (!mgrmap.get_available()) { logger().warn("No active mgr available yet"); return seastar::now(); } - auto peer = mgrmap.get_active_addrs().front(); - conn = msgr.connect(peer, CEPH_ENTITY_TYPE_MGR); - // ask for the mgrconfigure message - auto m = ceph::make_message<MMgrOpen>(); - m->daemon_name = local_conf()->name.get_id(); - return conn->send(std::move(m)); + auto retry_interval = std::chrono::duration<double>( + local_conf().get_val<double>("mgr_connect_retry_interval")); + auto a_while = std::chrono::duration_cast<seastar::steady_clock_type::duration>( + retry_interval); + return seastar::sleep(a_while).then([this] { + auto peer = mgrmap.get_active_addrs().front(); + conn = msgr.connect(peer, CEPH_ENTITY_TYPE_MGR); + }); } seastar::future<> Client::handle_mgr_map(crimson::net::Connection*, @@ -104,28 +119,25 @@ seastar::future<> Client::handle_mgr_conf(crimson::net::Connection* conn, { logger().info("{} {}", __func__, *m); - auto tick_period = std::chrono::seconds{m->stats_period}; - if (tick_period.count()) { - if (tick_timer.armed()) { - tick_timer.rearm(tick_timer.get_timeout(), tick_period); + auto report_period = std::chrono::seconds{m->stats_period}; + if (report_period.count()) { + if (report_timer.armed()) { + report_timer.rearm(report_timer.get_timeout(), report_period); } else { - tick_timer.arm_periodic(tick_period); + report_timer.arm_periodic(report_period); } } else { - tick_timer.cancel(); + report_timer.cancel(); } return seastar::now(); } -void Client::tick() +void Client::report() { (void) seastar::with_gate(gate, [this] { - if (conn) { - auto pg_stats = with_stats.get_stats(); - return conn->send(std::move(pg_stats)); - } else { - return reconnect(); - } + assert(conn); + auto pg_stats = with_stats.get_stats(); + return conn->send(std::move(pg_stats)); }); } diff --git a/src/crimson/mgr/client.h b/src/crimson/mgr/client.h index 0332c59d57b..099a504f08f 100644 --- a/src/crimson/mgr/client.h +++ b/src/crimson/mgr/client.h @@ -39,20 +39,21 @@ public: private: seastar::future<> ms_dispatch(crimson::net::Connection* conn, Ref<Message> m) override; - seastar::future<> ms_handle_reset(crimson::net::ConnectionRef conn) override; + seastar::future<> ms_handle_reset(crimson::net::ConnectionRef conn) final; + seastar::future<> ms_handle_connect(crimson::net::ConnectionRef conn) final; seastar::future<> handle_mgr_map(crimson::net::Connection* conn, Ref<MMgrMap> m); seastar::future<> handle_mgr_conf(crimson::net::Connection* conn, Ref<MMgrConfigure> m); seastar::future<> reconnect(); - void tick(); + void report(); private: MgrMap mgrmap; crimson::net::Messenger& msgr; WithStats& with_stats; crimson::net::ConnectionRef conn; - seastar::timer<seastar::lowres_clock> tick_timer; + seastar::timer<seastar::lowres_clock> report_timer; seastar::gate gate; }; diff --git a/src/crimson/mon/MonClient.cc b/src/crimson/mon/MonClient.cc index 03d57bb71aa..00180370137 100644 --- a/src/crimson/mon/MonClient.cc +++ b/src/crimson/mon/MonClient.cc @@ -79,7 +79,7 @@ public: const std::vector<uint32_t>& allowed_modes); // v1 and v2 - seastar::future<> close(); + void close(); bool is_my_peer(const entity_addr_t& addr) const; AuthAuthorizer* get_authorizer(entity_type_t peer) const; KeyStore& get_keys(); @@ -427,16 +427,14 @@ int Connection::handle_auth_bad_method(uint32_t old_auth_method, return 0; } -seastar::future<> Connection::close() +void Connection::close() { reply.set_value(Ref<MAuthReply>(nullptr)); reply = {}; auth_done.set_value(AuthResult::canceled); auth_done = {}; if (conn && !std::exchange(closed, true)) { - return conn->close(); - } else { - return seastar::now(); + conn->mark_down(); } } @@ -551,7 +549,8 @@ seastar::future<> Client::ms_handle_reset(crimson::net::ConnectionRef conn) }); if (found != pending_conns.end()) { logger().warn("pending conn reset by {}", conn->get_peer_addr()); - return (*found)->close(); + (*found)->close(); + return seastar::now(); } else if (active_con && active_con->is_my_peer(conn->get_peer_addr())) { logger().warn("active conn reset {}", conn->get_peer_addr()); active_con.reset(); @@ -920,9 +919,7 @@ seastar::future<> Client::stop() return tick_gate.close().then([this] { timer.cancel(); if (active_con) { - return active_con->close(); - } else { - return seastar::now(); + active_con->close(); } }); } @@ -953,9 +950,8 @@ seastar::future<> Client::reopen_session(int rank) } else { return mc->authenticate_v1(monmap.get_epoch(), entity_name, want_keys) .handle_exception([conn](auto ep) { - return conn->close().then([ep=std::move(ep)](){ - return seastar::make_exception_future<Connection::AuthResult>(ep); - }); + conn->mark_down(); + return seastar::make_exception_future<Connection::AuthResult>(ep); }); } }).then([peer, this](auto result) { @@ -986,21 +982,13 @@ seastar::future<> Client::reopen_session(int rank) ceph_assert(!active_con && !pending_conns.empty()); active_con = std::move(*found); found->reset(); - auto ret = seastar::do_with( - std::move(pending_conns), - [](auto &pending_conns) { - return seastar::parallel_for_each( - pending_conns, - [] (auto &conn) { - if (!conn) { - return seastar::now(); - } else { - return conn->close(); - } - }); - }); + for (auto& conn : pending_conns) { + if (conn) { + conn->close(); + } + } pending_conns.clear(); - return ret; + return seastar::now(); }).then([]() { logger().debug("reopen_session mon connection attempts complete"); }).handle_exception([](auto ep) { diff --git a/src/crimson/net/Connection.h b/src/crimson/net/Connection.h index d43d61b699e..04c57cb120f 100644 --- a/src/crimson/net/Connection.h +++ b/src/crimson/net/Connection.h @@ -95,6 +95,8 @@ class Connection : public seastar::enable_shared_from_this<Connection> { #ifdef UNIT_TESTS_BUILT virtual bool is_closed() const = 0; + virtual bool is_closed_clean() const = 0; + virtual bool peer_wins() const = 0; #endif @@ -105,10 +107,9 @@ class Connection : public seastar::enable_shared_from_this<Connection> { /// handshake virtual seastar::future<> keepalive() = 0; - // close the connection and cancel any any pending futures from read/send - // Note it's OK to discard the returned future because Messenger::shutdown() - // will wait for all connections closed - virtual seastar::future<> close() = 0; + // close the connection and cancel any any pending futures from read/send, + // without dispatching any reset event + virtual void mark_down() = 0; virtual void print(ostream& out) const = 0; diff --git a/src/crimson/net/Protocol.cc b/src/crimson/net/Protocol.cc index bf2633c1c22..3d01f26e50d 100644 --- a/src/crimson/net/Protocol.cc +++ b/src/crimson/net/Protocol.cc @@ -7,6 +7,7 @@ #include "crimson/common/log.h" #include "crimson/net/Errors.h" +#include "crimson/net/Dispatcher.h" #include "crimson/net/Socket.h" #include "crimson/net/SocketConnection.h" #include "msg/Message.h" @@ -39,37 +40,62 @@ bool Protocol::is_connected() const return write_state == write_state_t::open; } -seastar::future<> Protocol::close() +void Protocol::close(bool dispatch_reset, + std::optional<std::function<void()>> f_accept_new) { if (closed) { // already closing - assert(close_ready.valid()); - return close_ready.get_future(); + return; } + logger().info("{} closing: reset {}, replace {}", conn, + dispatch_reset ? "yes" : "no", + f_accept_new ? "yes" : "no"); + // unregister_conn() drops a reference, so hold another until completion auto cleanup = [conn_ref = conn.shared_from_this(), this] { logger().debug("{} closed!", conn); +#ifdef UNIT_TESTS_BUILT + is_closed_clean = true; + if (conn.interceptor) { + conn.interceptor->register_conn_closed(conn); + } +#endif }; + // atomic operations + closed = true; trigger_close(); - - // close_ready become valid only after state is state_t::closing - assert(!close_ready.valid()); - + if (f_accept_new) { + (*f_accept_new)(); + } if (socket) { socket->shutdown(); - close_ready = pending_dispatch.close().finally([this] { - return socket->close(); - }).finally(std::move(cleanup)); - } else { - close_ready = pending_dispatch.close().finally(std::move(cleanup)); } - - closed = true; set_write_state(write_state_t::drop); + auto gate_closed = pending_dispatch.close(); + auto reset_dispatched = seastar::futurize_apply([this, dispatch_reset] { + if (dispatch_reset) { + return dispatcher.ms_handle_reset( + seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this())); + } + return seastar::now(); + }).handle_exception([this] (std::exception_ptr eptr) { + logger().error("{} ms_handle_reset caught exception: {}", conn, eptr); + ceph_abort("unexpected exception from ms_handle_reset()"); + }); - return close_ready.get_future(); + // asynchronous operations + assert(!close_ready.valid()); + close_ready = seastar::when_all_succeed( + std::move(gate_closed).finally([this] { + if (socket) { + return socket->close(); + } + return seastar::now(); + }), + std::move(reset_dispatched) + ).finally(std::move(cleanup)); } seastar::future<> Protocol::send(MessageRef msg) @@ -289,13 +315,8 @@ void Protocol::write_event() case write_state_t::open: [[fallthrough]]; case write_state_t::delay: - (void) seastar::with_gate(pending_dispatch, [this] { - return do_write_dispatch_sweep( - ).handle_exception([this] (std::exception_ptr eptr) { - logger().error("{} do_write_dispatch_sweep(): unexpected exception {}", - conn, eptr); - ceph_abort(); - }); + gated_dispatch("do_write_dispatch_sweep", [this] { + return do_write_dispatch_sweep(); }); return; case write_state_t::drop: diff --git a/src/crimson/net/Protocol.h b/src/crimson/net/Protocol.h index 4df2549c37c..b765b23539d 100644 --- a/src/crimson/net/Protocol.h +++ b/src/crimson/net/Protocol.h @@ -6,6 +6,7 @@ #include <seastar/core/gate.hh> #include <seastar/core/shared_future.hh> +#include "crimson/common/log.h" #include "Fwd.h" #include "SocketConnection.h" @@ -24,10 +25,20 @@ class Protocol { bool is_connected() const; +#ifdef UNIT_TESTS_BUILT + bool is_closed_clean = false; bool is_closed() const { return closed; } +#endif // Reentrant closing - seastar::future<> close(); + void close(bool dispatch_reset, std::optional<std::function<void()>> f_accept_new=std::nullopt); + seastar::future<> close_clean(bool dispatch_reset) { + close(dispatch_reset); + // it can happen if close_clean() is called inside Dispatcher::ms_handle_reset() + // which will otherwise result in deadlock + assert(close_ready.valid()); + return close_ready.get_future(); + } virtual void start_connect(const entity_addr_t& peer_addr, const entity_type_t& peer_type) = 0; @@ -53,19 +64,29 @@ class Protocol { public: const proto_t proto_type; + SocketRef socket; protected: + template <typename Func> + void gated_dispatch(const char* what, Func&& func) { + (void) seastar::with_gate(pending_dispatch, std::forward<Func>(func) + ).handle_exception([this, what] (std::exception_ptr eptr) { + crimson::get_logger(ceph_subsys_ms).error( + "{} gated_dispatch() {} caught exception: {}", conn, what, eptr); + ceph_abort("unexpected exception from gated_dispatch()"); + }); + } + Dispatcher &dispatcher; SocketConnection &conn; - SocketRef socket; - seastar::gate pending_dispatch; AuthConnectionMetaRef auth_meta; private: bool closed = false; // become valid only after closed == true seastar::shared_future<> close_ready; + seastar::gate pending_dispatch; // the write state-machine public: diff --git a/src/crimson/net/ProtocolV1.cc b/src/crimson/net/ProtocolV1.cc index 3eac0d2c924..b22ce30653a 100644 --- a/src/crimson/net/ProtocolV1.cc +++ b/src/crimson/net/ProtocolV1.cc @@ -309,8 +309,6 @@ void ProtocolV1::start_connect(const entity_addr_t& _peer_addr, state = state_t::connecting; set_write_state(write_state_t::delay); - // we don't know my ephemeral port yet - conn.set_ephemeral_port(0, SocketConnection::side_t::none); ceph_assert(!socket); conn.peer_addr = _peer_addr; conn.target_addr = _peer_addr; @@ -318,7 +316,7 @@ void ProtocolV1::start_connect(const entity_addr_t& _peer_addr, conn.policy = messenger.get_policy(_peer_type); messenger.register_conn( seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this())); - (void) seastar::with_gate(pending_dispatch, [this] { + gated_dispatch("start_connect", [this] { return Socket::connect(conn.peer_addr) .then([this](SocketRef sock) { socket = std::move(sock); @@ -347,8 +345,10 @@ void ProtocolV1::start_connect(const entity_addr_t& _peer_addr, throw std::system_error( make_error_code(crimson::net::error::bad_peer_address)); } - conn.set_ephemeral_port(caddr.get_port(), - SocketConnection::side_t::connector); + if (state != state_t::connecting) { + throw std::system_error(make_error_code(error::protocol_aborted)); + } + socket->learn_ephemeral_port_as_connector(caddr.get_port()); if (unlikely(caddr.is_msgr2())) { logger().warn("{} peer sent a v2 address for me: {}", conn, caddr); @@ -377,7 +377,7 @@ void ProtocolV1::start_connect(const entity_addr_t& _peer_addr, }).handle_exception([this] (std::exception_ptr eptr) { // TODO: handle fault in the connecting state logger().warn("{} connecting fault: {}", conn, eptr); - (void) close(); + close(true); }); }); } @@ -466,7 +466,7 @@ seastar::future<stop_t> ProtocolV1::replace_existing( // will all be performed using v2 protocol. ceph_abort("lossless policy not supported for v1"); } - (void) existing->close(); + existing->protocol->close(true); return send_connect_reply_ready(reply_tag, std::move(authorizer_reply)); } @@ -583,7 +583,8 @@ seastar::future<stop_t> ProtocolV1::repeat_handle_connect() logger().warn("{} existing {} proto version is {} not 1, close existing", conn, *existing, static_cast<int>(existing->protocol->proto_type)); - (void) existing->close(); + // NOTE: this is following async messenger logic, but we may miss the reset event. + existing->mark_down(); } else { return handle_connect_with_existing(existing, std::move(authorizer_reply)); } @@ -612,12 +613,10 @@ void ProtocolV1::start_accept(SocketRef&& sock, ceph_assert(!socket); // until we know better conn.target_addr = _peer_addr; - conn.set_ephemeral_port(_peer_addr.get_port(), - SocketConnection::side_t::acceptor); socket = std::move(sock); messenger.accept_conn( seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this())); - (void) seastar::with_gate(pending_dispatch, [this] { + gated_dispatch("start_accept", [this] { // stop learning my_addr before sending it out, so it won't change return messenger.learned_addr(messenger.get_myaddr(), conn).then([this] { // encode/send server's handshake header @@ -663,7 +662,7 @@ void ProtocolV1::start_accept(SocketRef&& sock, }).handle_exception([this] (std::exception_ptr eptr) { // TODO: handle fault in the accepting state logger().warn("{} accepting fault: {}", conn, eptr); - (void) close(); + close(false); }); }); } @@ -847,15 +846,11 @@ seastar::future<> ProtocolV1::read_message() } // start dispatch, ignoring exceptions from the application layer - (void) seastar::with_gate(pending_dispatch, [this, msg = std::move(msg_ref)] { - logger().debug("{} <== #{} === {} ({})", - conn, msg->get_seq(), *msg, msg->get_type()); - return dispatcher.ms_dispatch(&conn, std::move(msg)) - .handle_exception([this] (std::exception_ptr eptr) { - logger().error("{} ms_dispatch caught exception: {}", conn, eptr); - ceph_assert(false); - }); - }); + gated_dispatch("ms_dispatch", [this, msg = std::move(msg_ref)] { + logger().debug("{} <== #{} === {} ({})", + conn, msg->get_seq(), *msg, msg->get_type()); + return dispatcher.ms_dispatch(&conn, std::move(msg)); + }); }); } @@ -894,31 +889,23 @@ void ProtocolV1::execute_open() state = state_t::open; set_write_state(write_state_t::open); - (void) seastar::with_gate(pending_dispatch, [this] { + gated_dispatch("execute_open", [this] { // start background processing of tags return handle_tags() .handle_exception_type([this] (const std::system_error& e) { logger().warn("{} open fault: {}", conn, e); if (e.code() == error::protocol_aborted || - e.code() == std::errc::connection_reset) { - return dispatcher.ms_handle_reset( - seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this())) - .then([this] { - (void) close(); - }); - } else if (e.code() == error::read_eof) { - return dispatcher.ms_handle_remote_reset( - seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this())) - .then([this] { - (void) close(); - }); + e.code() == std::errc::connection_reset || + e.code() == error::read_eof) { + close(true); + return seastar::now(); } else { throw e; } }).handle_exception([this] (std::exception_ptr eptr) { // TODO: handle fault in the open state logger().warn("{} open fault: {}", conn, eptr); - (void) close(); + close(true); }); }); } diff --git a/src/crimson/net/ProtocolV2.cc b/src/crimson/net/ProtocolV2.cc index 2535584bb6e..b6d35514d59 100644 --- a/src/crimson/net/ProtocolV2.cc +++ b/src/crimson/net/ProtocolV2.cc @@ -5,16 +5,12 @@ #include <seastar/core/lowres_clock.hh> #include <fmt/format.h> -#if FMT_VERSION >= 60000 -#include <fmt/chrono.h> -#else -#include <fmt/time.h> -#endif #include "include/msgr.h" #include "include/random.h" #include "crimson/auth/AuthClient.h" #include "crimson/auth/AuthServer.h" +#include "crimson/common/formatter.h" #include "Config.h" #include "Dispatcher.h" @@ -66,8 +62,8 @@ void abort_protocol() { throw std::system_error(make_error_code(crimson::net::error::protocol_aborted)); } -void abort_in_close(crimson::net::ProtocolV2& proto) { - (void) proto.close(); +void abort_in_close(crimson::net::ProtocolV2& proto, bool dispatch_reset) { + proto.close(dispatch_reset); abort_protocol(); } @@ -99,32 +95,6 @@ inline uint64_t generate_client_cookie() { } // namespace anonymous -template <> -struct fmt::formatter<seastar::lowres_system_clock::time_point> { - // ignore the format string - template <typename ParseContext> - constexpr auto parse(ParseContext &ctx) { return ctx.begin(); } - - template <typename FormatContext> - auto format(const seastar::lowres_system_clock::time_point& t, - FormatContext& ctx) { - std::time_t tt = std::chrono::duration_cast<std::chrono::seconds>( - t.time_since_epoch()).count(); - auto milliseconds = (t.time_since_epoch() % - std::chrono::seconds(1)).count(); - return fmt::format_to(ctx.out(), "{:%Y-%m-%d %H:%M:%S} {:03d}", - fmt::localtime(tt), milliseconds); - } -}; - -namespace std { -inline ostream& operator<<( - ostream& out, const seastar::lowres_system_clock::time_point& t) -{ - return out << fmt::format("{}", t); -} -} - namespace crimson::net { #ifdef UNIT_TESTS_BUILT @@ -210,8 +180,6 @@ void ProtocolV2::start_accept(SocketRef&& sock, ceph_assert(!socket); // until we know better conn.target_addr = _peer_addr; - conn.set_ephemeral_port(_peer_addr.get_port(), - SocketConnection::side_t::acceptor); socket = std::move(sock); logger().info("{} ProtocolV2::start_accept(): target_addr={}", conn, _peer_addr); messenger.accept_conn( @@ -443,8 +411,7 @@ void ProtocolV2::fault(bool backoff, const char* func_name, std::exception_ptr e if (conn.policy.lossy) { logger().info("{} {}: fault at {} on lossy channel, going to CLOSING -- {}", conn, func_name, get_state_name(state), eptr); - dispatch_reset(); - (void) close(); + close(true); } else if (conn.policy.server || (conn.policy.standby && (!is_queued() && conn.sent.empty()))) { @@ -462,17 +429,6 @@ void ProtocolV2::fault(bool backoff, const char* func_name, std::exception_ptr e } } -void ProtocolV2::dispatch_reset() -{ - (void) seastar::with_gate(pending_dispatch, [this] { - return dispatcher.ms_handle_reset( - seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this())); - }).handle_exception([this] (std::exception_ptr eptr) { - logger().error("{} ms_handle_reset caught exception: {}", conn, eptr); - ceph_abort("unexpected exception from ms_handle_reset()"); - }); -} - void ProtocolV2::reset_session(bool full) { server_cookie = 0; @@ -482,17 +438,14 @@ void ProtocolV2::reset_session(bool full) client_cookie = generate_client_cookie(); peer_global_seq = 0; reset_write(); - (void) seastar::with_gate(pending_dispatch, [this] { + gated_dispatch("ms_handle_remote_reset", [this] { return dispatcher.ms_handle_remote_reset( seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this())); - }).handle_exception([this] (std::exception_ptr eptr) { - logger().error("{} ms_handle_remote_reset caught exception: {}", conn, eptr); - ceph_abort("unexpected exception from ms_handle_remote_reset()"); }); } } -seastar::future<entity_type_t, entity_addr_t> ProtocolV2::banner_exchange() +seastar::future<entity_type_t, entity_addr_t> ProtocolV2::banner_exchange(bool is_connect) { // 1. prepare and send banner bufferlist banner_payload; @@ -545,7 +498,7 @@ seastar::future<entity_type_t, entity_addr_t> ProtocolV2::banner_exchange() logger().debug("{} GOT banner: payload_len={}", conn, payload_len); INTERCEPT_CUSTOM(custom_bp_t::BANNER_PAYLOAD_READ, bp_type_t::READ); return read(payload_len); - }).then([this] (bufferlist bl) { + }).then([this, is_connect] (bufferlist bl) { // 4. process peer banner_payload and send HelloFrame auto p = bl.cbegin(); uint64_t peer_supported_features; @@ -568,13 +521,13 @@ seastar::future<entity_type_t, entity_addr_t> ProtocolV2::banner_exchange() logger().error("{} peer does not support all required features" " required={} peer_supported={}", conn, required_features, peer_supported_features); - abort_in_close(*this); + abort_in_close(*this, is_connect); } if ((supported_features & peer_required_features) != peer_required_features) { logger().error("{} we do not support all peer required features" " peer_required={} supported={}", conn, peer_required_features, supported_features); - abort_in_close(*this); + abort_in_close(*this, is_connect); } this->peer_required_features = peer_required_features; if (this->peer_required_features == 0) { @@ -698,8 +651,7 @@ seastar::future<> ProtocolV2::client_auth(std::vector<uint32_t> &allowed_methods }); } catch (const crimson::auth::error& e) { logger().error("{} get_initial_auth_request returned {}", conn, e); - dispatch_reset(); - abort_in_close(*this); + abort_in_close(*this, true); return seastar::now(); } } @@ -893,9 +845,7 @@ void ProtocolV2::execute_connecting() if (socket) { socket->shutdown(); } - execution_done = seastar::with_gate(pending_dispatch, [this] { - // we don't know my socket_port yet - conn.set_ephemeral_port(0, SocketConnection::side_t::none); + gated_execute("execute_connecting", [this] { return messenger.get_global_seq().then([this] (auto gs) { global_seq = gs; assert(client_cookie != 0); @@ -917,7 +867,8 @@ void ProtocolV2::execute_connecting() abort_protocol(); } if (socket) { - (void) with_gate(pending_dispatch, [sock = std::move(socket)] () mutable { + gated_dispatch("close_sockect_connecting", + [sock = std::move(socket)] () mutable { return sock->close().then([sock = std::move(sock)] {}); }); } @@ -938,18 +889,21 @@ void ProtocolV2::execute_connecting() auth_meta = seastar::make_lw_shared<AuthConnectionMeta>(); session_stream_handlers = { nullptr, nullptr }; enable_recording(); - return banner_exchange(); + return banner_exchange(true); }).then([this] (entity_type_t _peer_type, entity_addr_t _my_addr_from_peer) { if (conn.get_peer_type() != _peer_type) { logger().warn("{} connection peer type does not match what peer advertises {} != {}", conn, ceph_entity_type_name(conn.get_peer_type()), ceph_entity_type_name(_peer_type)); - dispatch_reset(); - abort_in_close(*this); + abort_in_close(*this, true); + } + if (unlikely(state != state_t::CONNECTING)) { + logger().debug("{} triggered {} during banner_exchange(), abort", + conn, get_state_name(state)); + abort_protocol(); } - conn.set_ephemeral_port(_my_addr_from_peer.get_port(), - SocketConnection::side_t::connector); + socket->learn_ephemeral_port_as_connector(_my_addr_from_peer.get_port()); if (unlikely(_my_addr_from_peer.is_legacy())) { logger().warn("{} peer sent a legacy address for me: {}", conn, _my_addr_from_peer); @@ -976,12 +930,9 @@ void ProtocolV2::execute_connecting() } switch (next) { case next_step_t::ready: { - (void) seastar::with_gate(pending_dispatch, [this] { + gated_dispatch("ms_handle_connect", [this] { return dispatcher.ms_handle_connect( seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this())); - }).handle_exception([this] (std::exception_ptr eptr) { - logger().error("{} ms_handle_connect caught exception: {}", conn, eptr); - ceph_abort("unexpected exception from ms_handle_connect()"); }); logger().info("{} connected:" " gs={}, pgs={}, cs={}, client_cookie={}," @@ -1158,7 +1109,7 @@ ProtocolV2::reuse_connection( // close this connection because all the necessary information is delivered // to the exisiting connection, and jump to error handling code to abort the // current state. - abort_in_close(*this); + abort_in_close(*this, false); return seastar::make_ready_future<next_step_t>(next_step_t::none); } @@ -1202,15 +1153,7 @@ ProtocolV2::handle_existing_connection(SocketConnectionRef existing_conn) logger().warn("{} server_connect:" " existing connection {} is a lossy channel. Close existing in favor of" " this connection", conn, *existing_conn); - existing_proto->dispatch_reset(); - (void) existing_proto->close(); - - if (unlikely(state != state_t::ACCEPTING)) { - logger().debug("{} triggered {} in execute_accepting()", - conn, get_state_name(state)); - abort_protocol(); - } - execute_establishing(); + execute_establishing(existing_conn, true); return seastar::make_ready_future<next_step_t>(next_step_t::ready); } @@ -1334,24 +1277,21 @@ ProtocolV2::server_connect() SocketConnectionRef existing_conn = messenger.lookup_conn(conn.peer_addr); + bool dispatch_reset = true; if (existing_conn) { if (existing_conn->protocol->proto_type != proto_t::v2) { logger().warn("{} existing connection {} proto version is {}, close existing", conn, *existing_conn, static_cast<int>(existing_conn->protocol->proto_type)); // should unregister the existing from msgr atomically - (void) existing_conn->close(); + // NOTE: this is following async messenger logic, but we may miss the reset event. + dispatch_reset = false; } else { return handle_existing_connection(existing_conn); } } - if (unlikely(state != state_t::ACCEPTING)) { - logger().debug("{} triggered {} in execute_accepting()", - conn, get_state_name(state)); - abort_protocol(); - } - execute_establishing(); + execute_establishing(existing_conn, dispatch_reset); return seastar::make_ready_future<next_step_t>(next_step_t::ready); }); } @@ -1449,7 +1389,8 @@ ProtocolV2::server_reconnect() "close existing and reset client.", conn, *existing_conn, static_cast<int>(existing_conn->protocol->proto_type)); - (void) existing_conn->close(); + // NOTE: this is following async messenger logic, but we may miss the reset event. + existing_conn->mark_down(); return send_reset(true); } @@ -1542,13 +1483,13 @@ ProtocolV2::server_reconnect() void ProtocolV2::execute_accepting() { trigger_state(state_t::ACCEPTING, write_state_t::none, false); - (void) seastar::with_gate(pending_dispatch, [this] { + gated_dispatch("execute_accepting", [this] { return seastar::futurize_apply([this] { INTERCEPT_N_RW(custom_bp_t::SOCKET_ACCEPTED); auth_meta = seastar::make_lw_shared<AuthConnectionMeta>(); session_stream_handlers = { nullptr, nullptr }; enable_recording(); - return banner_exchange(); + return banner_exchange(false); }).then([this] (entity_type_t _peer_type, entity_addr_t _my_addr_from_peer) { ceph_assert(conn.get_peer_type() == 0); @@ -1603,7 +1544,7 @@ void ProtocolV2::execute_accepting() }).handle_exception([this] (std::exception_ptr eptr) { logger().info("{} execute_accepting(): fault at {}, going to CLOSING -- {}", conn, get_state_name(state), eptr); - (void) close(); + close(false); }); }); } @@ -1645,22 +1586,36 @@ seastar::future<> ProtocolV2::finish_auth() // ESTABLISHING -void ProtocolV2::execute_establishing() { +void ProtocolV2::execute_establishing( + SocketConnectionRef existing_conn, bool dispatch_reset) { + if (unlikely(state != state_t::ACCEPTING)) { + logger().debug("{} triggered {} before execute_establishing()", + conn, get_state_name(state)); + abort_protocol(); + } + + auto accept_me = [this] { + messenger.register_conn( + seastar::static_pointer_cast<SocketConnection>( + conn.shared_from_this())); + messenger.unaccept_conn( + seastar::static_pointer_cast<SocketConnection>( + conn.shared_from_this())); + }; + trigger_state(state_t::ESTABLISHING, write_state_t::delay, false); - (void) seastar::with_gate(pending_dispatch, [this] { + if (existing_conn) { + existing_conn->protocol->close(dispatch_reset, std::move(accept_me)); + } else { + accept_me(); + } + + gated_dispatch("ms_handle_accept_establishing", [this] { return dispatcher.ms_handle_accept( seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this())); - }).handle_exception([this] (std::exception_ptr eptr) { - logger().error("{} ms_handle_accept caught exception: {}", conn, eptr); - ceph_abort("unexpected exception from ms_handle_accept()"); }); - messenger.register_conn( - seastar::static_pointer_cast<SocketConnection>( - conn.shared_from_this())); - messenger.unaccept_conn( - seastar::static_pointer_cast<SocketConnection>( - conn.shared_from_this())); - execution_done = seastar::with_gate(pending_dispatch, [this] { + + gated_execute("execute_establishing", [this] { return seastar::futurize_apply([this] { return send_server_ident(); }).then([this] { @@ -1753,23 +1708,20 @@ void ProtocolV2::trigger_replacing(bool reconnect, if (socket) { socket->shutdown(); } - (void) seastar::with_gate(pending_dispatch, [this] { + gated_dispatch("ms_handle_accept_replacing", [this] { return dispatcher.ms_handle_accept( seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this())); - }).handle_exception([this] (std::exception_ptr eptr) { - logger().error("{} ms_handle_accept caught exception: {}", conn, eptr); - ceph_abort("unexpected exception from ms_handle_accept()"); }); - (void) seastar::with_gate(pending_dispatch, - [this, - reconnect, - do_reset, - new_socket = std::move(new_socket), - new_auth_meta = std::move(new_auth_meta), - new_rxtx = std::move(new_rxtx), - new_client_cookie, new_peer_name, - new_conn_features, new_peer_global_seq, - new_connect_seq, new_msg_seq] () mutable { + gated_dispatch("trigger_replacing", + [this, + reconnect, + do_reset, + new_socket = std::move(new_socket), + new_auth_meta = std::move(new_auth_meta), + new_rxtx = std::move(new_rxtx), + new_client_cookie, new_peer_name, + new_conn_features, new_peer_global_seq, + new_connect_seq, new_msg_seq] () mutable { return wait_write_exit().then([this, do_reset] { if (do_reset) { reset_session(true); @@ -1791,7 +1743,8 @@ void ProtocolV2::trigger_replacing(bool reconnect, } if (socket) { - (void) with_gate(pending_dispatch, [sock = std::move(socket)] () mutable { + gated_dispatch("close_socket_replacing", + [sock = std::move(socket)] () mutable { return sock->close().then([sock = std::move(sock)] {}); }); } @@ -1983,11 +1936,8 @@ seastar::future<> ProtocolV2::read_message(utime_t throttle_stamp) // TODO: change MessageRef with seastar::shared_ptr auto msg_ref = MessageRef{message, false}; - (void) seastar::with_gate(pending_dispatch, [this, msg = std::move(msg_ref)] { + gated_dispatch("ms_dispatch", [this, msg = std::move(msg_ref)] { return dispatcher.ms_dispatch(&conn, std::move(msg)); - }).handle_exception([this] (std::exception_ptr eptr) { - logger().error("{} ms_dispatch caught exception: {}", conn, eptr); - ceph_abort("unexpected exception from ms_dispatch()"); }); }); } @@ -2001,7 +1951,7 @@ void ProtocolV2::execute_ready() conn.interceptor->register_conn_ready(conn); } #endif - execution_done = seastar::with_gate(pending_dispatch, [this] { + gated_execute("execute_ready", [this] { protocol_timer.cancel(); return seastar::keep_doing([this] { return read_main_preamble() @@ -2107,8 +2057,7 @@ void ProtocolV2::execute_wait(bool max_backoff) if (socket) { socket->shutdown(); } - execution_done = seastar::with_gate(pending_dispatch, - [this, max_backoff] { + gated_execute("execute_wait", [this, max_backoff] { double backoff = protocol_timer.last_dur(); if (max_backoff) { backoff = conf.ms_max_backoff; @@ -2139,14 +2088,14 @@ void ProtocolV2::execute_wait(bool max_backoff) void ProtocolV2::execute_server_wait() { trigger_state(state_t::SERVER_WAIT, write_state_t::delay, false); - execution_done = seastar::with_gate(pending_dispatch, [this] { + gated_execute("execute_server_wait", [this] { return read_exactly(1).then([this] (auto bl) { logger().warn("{} SERVER_WAIT got read, abort", conn); abort_in_fault(); }).handle_exception([this] (std::exception_ptr eptr) { logger().info("{} execute_server_wait(): fault at {}, going to CLOSING -- {}", conn, get_state_name(state), eptr); - (void) close(); + close(false); }); }); } @@ -2171,11 +2120,6 @@ void ProtocolV2::trigger_close() protocol_timer.cancel(); trigger_state(state_t::CLOSING, write_state_t::drop, false); -#ifdef UNIT_TESTS_BUILT - if (conn.interceptor) { - conn.interceptor->register_conn_closed(conn); - } -#endif } } // namespace crimson::net diff --git a/src/crimson/net/ProtocolV2.h b/src/crimson/net/ProtocolV2.h index 0e8f2ff90e8..f98bf3d4366 100644 --- a/src/crimson/net/ProtocolV2.h +++ b/src/crimson/net/ProtocolV2.h @@ -80,6 +80,14 @@ class ProtocolV2 final : public Protocol { seastar::shared_future<> execution_done = seastar::now(); + template <typename Func> + void gated_execute(const char* what, Func&& func) { + gated_dispatch(what, [this, &func] { + execution_done = seastar::futurize_apply(std::forward<Func>(func)); + return execution_done.get_future(); + }); + } + class Timer { double last_dur_ = 0.0; const SocketConnection& conn; @@ -124,9 +132,8 @@ class ProtocolV2 final : public Protocol { private: void fault(bool backoff, const char* func_name, std::exception_ptr eptr); - void dispatch_reset(); void reset_session(bool full); - seastar::future<entity_type_t, entity_addr_t> banner_exchange(); + seastar::future<entity_type_t, entity_addr_t> banner_exchange(bool is_connect); enum class next_step_t { ready, @@ -174,7 +181,7 @@ class ProtocolV2 final : public Protocol { seastar::future<> finish_auth(); // ESTABLISHING - void execute_establishing(); + void execute_establishing(SocketConnectionRef existing_conn, bool dispatch_reset); // ESTABLISHING/REPLACING (server) seastar::future<> send_server_ident(); diff --git a/src/crimson/net/Socket.h b/src/crimson/net/Socket.h index c97554f50ba..a9989650c9d 100644 --- a/src/crimson/net/Socket.h +++ b/src/crimson/net/Socket.h @@ -25,31 +25,25 @@ using SocketRef = std::unique_ptr<Socket>; class Socket { - const seastar::shard_id sid; - seastar::connected_socket socket; - seastar::input_stream<char> in; - seastar::output_stream<char> out; - -#ifndef NDEBUG - bool closed = false; -#endif - - /// buffer state for read() - struct { - bufferlist buffer; - size_t remaining; - } r; - struct construct_tag {}; public: - Socket(seastar::connected_socket&& _socket, construct_tag) + // if acceptor side, peer is using a different port (ephemeral_port) + // if connector side, I'm using a different port (ephemeral_port) + enum class side_t { + acceptor, + connector + }; + + Socket(seastar::connected_socket&& _socket, side_t _side, uint16_t e_port, construct_tag) : sid{seastar::engine().cpu_id()}, socket(std::move(_socket)), in(socket.input()), // the default buffer size 8192 is too small that may impact our write // performance. see seastar::net::connected_socket::output() - out(socket.output(65536)) {} + out(socket.output(65536)), + side(_side), + ephemeral_port(e_port) {} ~Socket() { #ifndef NDEBUG @@ -63,7 +57,8 @@ class Socket connect(const entity_addr_t& peer_addr) { return seastar::connect(peer_addr.in4_addr() ).then([] (seastar::connected_socket socket) { - return std::make_unique<Socket>(std::move(socket), construct_tag{}); + return std::make_unique<Socket>( + std::move(socket), side_t::connector, 0, construct_tag{}); }); } @@ -115,7 +110,45 @@ class Socket socket.shutdown_output(); } + side_t get_side() const { + return side; + } + + uint16_t get_ephemeral_port() const { + return ephemeral_port; + } + + // learn my ephemeral_port as connector. + // unfortunately, there's no way to identify which port I'm using as + // connector with current seastar interface. + void learn_ephemeral_port_as_connector(uint16_t port) { + assert(side == side_t::connector && + (ephemeral_port == 0 || ephemeral_port == port)); + ephemeral_port = port; + } + + private: + const seastar::shard_id sid; + seastar::connected_socket socket; + seastar::input_stream<char> in; + seastar::output_stream<char> out; + side_t side; + uint16_t ephemeral_port; + +#ifndef NDEBUG + bool closed = false; +#endif + + /// buffer state for read() + struct { + bufferlist buffer; + size_t remaining; + } r; + #ifdef UNIT_TESTS_BUILT + public: + void set_trap(bp_type_t type, bp_action_t action, socket_blocker* blocker_); + private: bp_action_t next_trap_read = bp_action_t::CONTINUE; bp_action_t next_trap_write = bp_action_t::CONTINUE; @@ -123,9 +156,6 @@ class Socket seastar::future<> try_trap_pre(bp_action_t& trap); seastar::future<> try_trap_post(bp_action_t& trap); - public: - void set_trap(bp_type_t type, bp_action_t action, socket_blocker* blocker_); - #endif friend class FixedCPUServerSocket; }; @@ -214,7 +244,8 @@ public: peer_addr.set_sockaddr(&paddr.as_posix_sockaddr()); peer_addr.set_type(entity_addr_t::TYPE_ANY); SocketRef _socket = std::make_unique<Socket>( - std::move(socket), Socket::construct_tag{}); + std::move(socket), Socket::side_t::acceptor, + peer_addr.get_port(), Socket::construct_tag{}); std::ignore = seastar::with_gate(ss.shutdown_gate, [socket = std::move(_socket), peer_addr, &ss, fn_accept = std::move(fn_accept)] () mutable { diff --git a/src/crimson/net/SocketConnection.cc b/src/crimson/net/SocketConnection.cc index 4a73034e922..6d84acf1469 100644 --- a/src/crimson/net/SocketConnection.cc +++ b/src/crimson/net/SocketConnection.cc @@ -63,6 +63,12 @@ bool SocketConnection::is_closed() const return protocol->is_closed(); } +bool SocketConnection::is_closed_clean() const +{ + assert(seastar::engine().cpu_id() == shard_id()); + return protocol->is_closed_clean; +} + #endif bool SocketConnection::peer_wins() const { @@ -81,10 +87,10 @@ seastar::future<> SocketConnection::keepalive() return protocol->keepalive(); } -seastar::future<> SocketConnection::close() +void SocketConnection::mark_down() { assert(seastar::engine().cpu_id() == shard_id()); - return protocol->close(); + protocol->close(false); } bool SocketConnection::update_rx_seq(seq_num_t seq) @@ -120,19 +126,25 @@ SocketConnection::start_accept(SocketRef&& sock, protocol->start_accept(std::move(sock), _peer_addr); } +seastar::future<> +SocketConnection::close_clean(bool dispatch_reset) +{ + return protocol->close_clean(dispatch_reset); +} + seastar::shard_id SocketConnection::shard_id() const { return messenger.shard_id(); } void SocketConnection::print(ostream& out) const { messenger.print(out); - if (side == side_t::none) { + if (!protocol->socket) { out << " >> " << get_peer_name() << " " << peer_addr; - } else if (side == side_t::acceptor) { + } else if (protocol->socket->get_side() == Socket::side_t::acceptor) { out << " >> " << get_peer_name() << " " << peer_addr - << "@" << ephemeral_port; - } else { // side == side_t::connector - out << "@" << ephemeral_port + << "@" << protocol->socket->get_ephemeral_port(); + } else { // protocol->socket->get_side() == Socket::side_t::connector + out << "@" << protocol->socket->get_ephemeral_port() << " >> " << get_peer_name() << " " << peer_addr; } } diff --git a/src/crimson/net/SocketConnection.h b/src/crimson/net/SocketConnection.h index 503d4e55fb0..358e8e00807 100644 --- a/src/crimson/net/SocketConnection.h +++ b/src/crimson/net/SocketConnection.h @@ -33,20 +33,6 @@ class SocketConnection : public Connection { SocketMessenger& messenger; std::unique_ptr<Protocol> protocol; - // if acceptor side, ephemeral_port is different from peer_addr.get_port(); - // if connector side, ephemeral_port is different from my_addr.get_port(). - enum class side_t { - none, - acceptor, - connector - }; - side_t side = side_t::none; - uint16_t ephemeral_port = 0; - void set_ephemeral_port(uint16_t port, side_t _side) { - ephemeral_port = port; - side = _side; - } - ceph::net::Policy<crimson::thread::Throttle> policy; /// the seq num of the last transmitted message @@ -77,6 +63,8 @@ class SocketConnection : public Connection { bool is_connected() const override; #ifdef UNIT_TESTS_BUILT + bool is_closed_clean() const override; + bool is_closed() const override; bool peer_wins() const override; @@ -88,7 +76,7 @@ class SocketConnection : public Connection { seastar::future<> keepalive() override; - seastar::future<> close() override; + void mark_down() override; void print(ostream& out) const override; @@ -101,6 +89,8 @@ class SocketConnection : public Connection { void start_accept(SocketRef&& socket, const entity_addr_t& peer_addr); + seastar::future<> close_clean(bool dispatch_reset); + bool is_server_side() const { return policy.server; } diff --git a/src/crimson/net/SocketMessenger.cc b/src/crimson/net/SocketMessenger.cc index 423e7d4edc9..c11e2b32753 100644 --- a/src/crimson/net/SocketMessenger.cc +++ b/src/crimson/net/SocketMessenger.cc @@ -141,6 +141,7 @@ SocketMessenger::connect(const entity_addr_t& peer_addr, const entity_type_t& pe ceph_assert(peer_addr.get_port() > 0); if (auto found = lookup_conn(peer_addr); found) { + logger().info("{} connect to existing", *found); return found->shared_from_this(); } SocketConnectionRef conn = seastar::make_shared<SocketConnection>( @@ -163,12 +164,12 @@ seastar::future<> SocketMessenger::shutdown() // close all connections }).then([this] { return seastar::parallel_for_each(accepting_conns, [] (auto conn) { - return conn->close(); + return conn->close_clean(false); }); }).then([this] { ceph_assert(accepting_conns.empty()); return seastar::parallel_for_each(connections, [] (auto conn) { - return conn.second->close(); + return conn.second->close_clean(false); }); }).then([this] { ceph_assert(connections.empty()); diff --git a/src/crimson/osd/ec_backend.cc b/src/crimson/osd/ec_backend.cc index 911dc250e8a..c6516d50a8e 100644 --- a/src/crimson/osd/ec_backend.cc +++ b/src/crimson/osd/ec_backend.cc @@ -26,9 +26,9 @@ seastar::future<crimson::osd::acked_peers_t> ECBackend::_submit_transaction(std::set<pg_shard_t>&& pg_shards, const hobject_t& hoid, ceph::os::Transaction&& txn, - osd_reqid_t req_id, + const osd_op_params_t& osd_op_p, epoch_t min_epoch, epoch_t max_epoch, - eversion_t ver) + std::vector<pg_log_entry_t>&& log_entries) { // todo return seastar::make_ready_future<crimson::osd::acked_peers_t>(); diff --git a/src/crimson/osd/ec_backend.h b/src/crimson/osd/ec_backend.h index c7548de0749..d9451d2296b 100644 --- a/src/crimson/osd/ec_backend.h +++ b/src/crimson/osd/ec_backend.h @@ -26,9 +26,9 @@ private: _submit_transaction(std::set<pg_shard_t>&& pg_shards, const hobject_t& hoid, ceph::os::Transaction&& txn, - osd_reqid_t req_id, + const osd_op_params_t& req, epoch_t min_epoch, epoch_t max_epoch, - eversion_t ver) final; + std::vector<pg_log_entry_t>&& log_entries) final; CollectionRef coll; crimson::os::FuturizedStore* store; }; diff --git a/src/crimson/osd/heartbeat.cc b/src/crimson/osd/heartbeat.cc index 0fb5eff7dcc..6f60654854c 100644 --- a/src/crimson/osd/heartbeat.cc +++ b/src/crimson/osd/heartbeat.cc @@ -9,6 +9,7 @@ #include "messages/MOSDFailure.h" #include "crimson/common/config_proxy.h" +#include "crimson/common/formatter.h" #include "crimson/net/Connection.h" #include "crimson/net/Messenger.h" #include "crimson/osd/shard_services.h" @@ -33,7 +34,10 @@ Heartbeat::Heartbeat(const crimson::osd::ShardServices& service, front_msgr{front_msgr}, back_msgr{back_msgr}, // do this in background - timer{[this] { (void)send_heartbeats(); }} + timer{[this] { + heartbeat_check(); + (void)send_heartbeats(); + }} {} seastar::future<> Heartbeat::start(entity_addrvec_t front_addrs, @@ -109,31 +113,19 @@ void Heartbeat::add_peer(osd_id_t peer, epoch_t epoch) } } -seastar::future<Heartbeat::osds_t> Heartbeat::remove_down_peers() +Heartbeat::osds_t Heartbeat::remove_down_peers() { osds_t osds; for (auto& peer : peers) { - osds.push_back(peer.first); + auto osd = peer.first; + auto osdmap = service.get_osdmap_service().get_map(); + if (!osdmap->is_up(osd)) { + remove_peer(osd); + } else if (peers[osd].epoch < osdmap->get_epoch()) { + osds.push_back(osd); + } } - return seastar::map_reduce(std::move(osds), - [this](auto& osd) { - auto osdmap = service.get_osdmap_service().get_map(); - if (!osdmap->is_up(osd)) { - return remove_peer(osd).then([] { - return seastar::make_ready_future<osd_id_t>(-1); - }); - } else if (peers[osd].epoch < osdmap->get_epoch()) { - return seastar::make_ready_future<osd_id_t>(osd); - } else { - return seastar::make_ready_future<osd_id_t>(-1); - } - }, osds_t{}, - [](osds_t&& extras, osd_id_t extra) { - if (extra >= 0) { - extras.push_back(extra); - } - return std::move(extras); - }); + return osds; } void Heartbeat::add_reporter_peers(int whoami) @@ -159,49 +151,37 @@ void Heartbeat::add_reporter_peers(int whoami) }; } -seastar::future<> Heartbeat::update_peers(int whoami) +void Heartbeat::update_peers(int whoami) { const auto min_peers = static_cast<size_t>( local_conf().get_val<int64_t>("osd_heartbeat_min_peers")); add_reporter_peers(whoami); - return remove_down_peers().then([=](osds_t&& extra) { - // too many? - struct iteration_state { - osds_t::const_iterator where; - osds_t::const_iterator end; - }; - return seastar::do_with(iteration_state{extra.begin(),extra.end()}, - [=](iteration_state& s) { - return seastar::do_until( - [min_peers, &s, this] { - return peers.size() <= min_peers || s.where == s.end; }, - [&s, this] { - return remove_peer(*s.where); } - ); - }); - }).then([=] { - // or too few? - auto osdmap = service.get_osdmap_service().get_map(); - auto epoch = osdmap->get_epoch(); - for (auto next = osdmap->get_next_up_osd_after(whoami); - peers.size() < min_peers && next >= 0 && next != whoami; - next = osdmap->get_next_up_osd_after(next)) { - add_peer(next, epoch); + auto extra = remove_down_peers(); + // too many? + for (auto& osd : extra) { + if (peers.size() <= min_peers) { + break; } - }); + remove_peer(osd); + } + // or too few? + auto osdmap = service.get_osdmap_service().get_map(); + auto epoch = osdmap->get_epoch(); + for (auto next = osdmap->get_next_up_osd_after(whoami); + peers.size() < min_peers && next >= 0 && next != whoami; + next = osdmap->get_next_up_osd_after(next)) { + add_peer(next, epoch); + } } -seastar::future<> Heartbeat::remove_peer(osd_id_t peer) +void Heartbeat::remove_peer(osd_id_t peer) { + logger().info("remove_peer({})", peer); auto found = peers.find(peer); assert(found != peers.end()); - logger().info("remove_peer({})", peer); - return seastar::when_all_succeed(found->second.con_front->close(), - found->second.con_back->close()).then( - [this, peer] { - peers.erase(peer); - return seastar::now(); - }); + found->second.con_front->mark_down(); + found->second.con_back->mark_down(); + peers.erase(peer); } seastar::future<> Heartbeat::ms_dispatch(crimson::net::Connection* conn, @@ -227,9 +207,9 @@ seastar::future<> Heartbeat::ms_handle_reset(crimson::net::ConnectionRef conn) } const auto peer = found->first; const auto epoch = found->second.epoch; - return remove_peer(peer).then([peer, epoch, this] { - add_peer(peer, epoch); - }); + remove_peer(peer); + add_peer(peer, epoch); + return seastar::now(); } seastar::future<> Heartbeat::handle_osd_ping(crimson::net::Connection* conn, @@ -294,7 +274,6 @@ seastar::future<> Heartbeat::handle_reply(crimson::net::Connection* conn, } if (peer.is_healthy(now)) { // cancel false reports - failure_queue.erase(from); if (auto pending = failure_pending.find(from); pending != failure_pending.end()) { return send_still_alive(from, pending->second.addrs); @@ -309,75 +288,104 @@ seastar::future<> Heartbeat::handle_you_died() return seastar::now(); } +void Heartbeat::heartbeat_check() +{ + failure_queue_t failure_queue; + const auto now = clock::now(); + for (const auto& [osd, peer_info]: peers) { + if (clock::is_zero(peer_info.first_tx)) { + continue; + } + + if (peer_info.is_unhealthy(now)) { + logger().error(" heartbeat_check: no reply from osd.{} " + "since back {} front {} (oldest deadline {})", + osd, peer_info.last_rx_back, peer_info.last_rx_front, + peer_info.ping_history.begin()->second.deadline); + failure_queue[osd] = std::min(peer_info.last_rx_back, + peer_info.last_rx_front); + } + } + if (!failure_queue.empty()) { + // send_failures can run in background, because + // 1. After the execution of send_failures, no msg is actually + // sent, which means the sending operation is not done, + // which further seems to involve problems risks that when + // osd shuts down, the left part of the sending operation + // may reference OSD and Heartbeat instances that are already + // deleted. However, remaining work of that sending operation + // involves no reference back to OSD or Heartbeat instances, + // which means it wouldn't involve the above risks. + // 2. messages are sent in order, if later checks find out + // the previous "failed" peers to be healthy, that "still + // alive" messages would be sent after the previous "osd + // failure" messages which is totally safe. + (void)send_failures(std::move(failure_queue)); + } +} + seastar::future<> Heartbeat::send_heartbeats() { - using peers_item_t = typename peers_map_t::value_type; - return seastar::parallel_for_each(peers, - [this](peers_item_t& item) { - const auto mnow = service.get_mnow(); - const auto now = clock::now(); - const auto deadline = - now + std::chrono::seconds(local_conf()->osd_heartbeat_grace); - auto& info = item.second; - info.last_tx = now; - if (clock::is_zero(info.first_tx)) { - info.first_tx = now; + const auto mnow = service.get_mnow(); + const auto now = clock::now(); + const auto deadline = + now + std::chrono::seconds(local_conf()->osd_heartbeat_grace); + const utime_t sent_stamp{now}; + + std::vector<seastar::future<>> futures; + for (auto& item : peers) { + auto& info = item.second; + info.last_tx = now; + if (clock::is_zero(info.first_tx)) { + info.first_tx = now; + } + [[maybe_unused]] auto [reply, added] = + info.ping_history.emplace(sent_stamp, reply_t{deadline, 0}); + crimson::net::ConnectionRef conns[] = {info.con_front, info.con_back}; + for (auto& con : conns) { + if (con) { + auto min_message = static_cast<uint32_t>( + local_conf()->osd_heartbeat_min_size); + auto ping = make_message<MOSDPing>( + monc.get_fsid(), + service.get_osdmap_service().get_map()->get_epoch(), + MOSDPing::PING, + sent_stamp, + mnow, + mnow, + service.get_osdmap_service().get_up_epoch(), + min_message); + reply->second.unacknowledged++; + futures.push_back(con->send(std::move(ping))); } - const utime_t sent_stamp{now}; - [[maybe_unused]] auto [reply, added] = - info.ping_history.emplace(sent_stamp, reply_t{deadline, 0}); - std::vector<crimson::net::ConnectionRef> conns{info.con_front, - info.con_back}; - return seastar::parallel_for_each(std::move(conns), - [sent_stamp, mnow, &reply=reply->second, this] (auto con) { - if (con) { - auto min_message = static_cast<uint32_t>( - local_conf()->osd_heartbeat_min_size); - auto ping = make_message<MOSDPing>( - monc.get_fsid(), - service.get_osdmap_service().get_map()->get_epoch(), - MOSDPing::PING, - sent_stamp, - mnow, - mnow, - service.get_osdmap_service().get_up_epoch(), - min_message); - return con->send(ping).then([&reply] { - reply.unacknowledged++; - return seastar::now(); - }); - } else { - return seastar::now(); - } - }); - }); + } + } + return seastar::when_all_succeed(futures.begin(), futures.end()); } -seastar::future<> Heartbeat::send_failures() +seastar::future<> Heartbeat::send_failures(failure_queue_t&& failure_queue) { - using failure_item_t = typename failure_queue_t::value_type; - return seastar::parallel_for_each(failure_queue, - [this](failure_item_t& failure_item) { - auto [osd, failed_since] = failure_item; - if (failure_pending.count(osd)) { - return seastar::now(); - } - auto failed_for = chrono::duration_cast<chrono::seconds>( - clock::now() - failed_since).count(); - auto osdmap = service.get_osdmap_service().get_map(); - auto failure_report = - make_message<MOSDFailure>(monc.get_fsid(), - osd, - osdmap->get_addrs(osd), - static_cast<int>(failed_for), - osdmap->get_epoch()); - failure_pending.emplace(osd, failure_info_t{failed_since, - osdmap->get_addrs(osd)}); - return monc.send_message(failure_report); - }).then([this] { - failure_queue.clear(); - return seastar::now(); - }); + std::vector<seastar::future<>> futures; + const auto now = clock::now(); + for (auto [osd, failed_since] : failure_queue) { + if (failure_pending.count(osd)) { + continue; + } + auto failed_for = chrono::duration_cast<chrono::seconds>( + now - failed_since).count(); + auto osdmap = service.get_osdmap_service().get_map(); + auto failure_report = + make_message<MOSDFailure>(monc.get_fsid(), + osd, + osdmap->get_addrs(osd), + static_cast<int>(failed_for), + osdmap->get_epoch()); + failure_pending.emplace(osd, failure_info_t{failed_since, + osdmap->get_addrs(osd)}); + futures.push_back(monc.send_message(failure_report)); + } + + return seastar::when_all_succeed(futures.begin(), futures.end()); } seastar::future<> Heartbeat::send_still_alive(osd_id_t osd, diff --git a/src/crimson/osd/heartbeat.h b/src/crimson/osd/heartbeat.h index 036299f3899..a0e6146cd47 100644 --- a/src/crimson/osd/heartbeat.h +++ b/src/crimson/osd/heartbeat.h @@ -35,11 +35,8 @@ public: seastar::future<> stop(); void add_peer(osd_id_t peer, epoch_t epoch); - seastar::future<> update_peers(int whoami); - seastar::future<> remove_peer(osd_id_t peer); - - seastar::future<> send_heartbeats(); - seastar::future<> send_failures(); + void update_peers(int whoami); + void remove_peer(osd_id_t peer); const entity_addrvec_t& get_front_addrs() const; const entity_addrvec_t& get_back_addrs() const; @@ -65,7 +62,7 @@ private: using osds_t = std::vector<osd_id_t>; /// remove down OSDs /// @return peers not needed in this epoch - seastar::future<osds_t> remove_down_peers(); + osds_t remove_down_peers(); /// add enough reporters for fast failure detection void add_reporter_peers(int whoami); @@ -109,12 +106,14 @@ private: }; using peers_map_t = std::map<osd_id_t, PeerInfo>; peers_map_t peers; - // osds which are considered failed // osd_id => when was the last time that both front and back pings were acked // use for calculating how long the OSD has been unresponsive using failure_queue_t = std::map<osd_id_t, clock::time_point>; - failure_queue_t failure_queue; + seastar::future<> send_failures(failure_queue_t&& failure_queue); + seastar::future<> send_heartbeats(); + void heartbeat_check(); + struct failure_info_t { clock::time_point failed_since; entity_addrvec_t addrs; diff --git a/src/crimson/osd/ops_executer.cc b/src/crimson/osd/ops_executer.cc index 46c9ce3ee6d..158153d2941 100644 --- a/src/crimson/osd/ops_executer.cc +++ b/src/crimson/osd/ops_executer.cc @@ -671,25 +671,25 @@ OpsExecuter::execute_osd_op(OSDOp& osd_op) case CEPH_OSD_OP_CREATE: return do_write_op([&osd_op] (auto& backend, auto& os, auto& txn) { return backend.create(os, osd_op, txn); - }); + }, true); case CEPH_OSD_OP_WRITE: return do_write_op([&osd_op] (auto& backend, auto& os, auto& txn) { return backend.write(os, osd_op, txn); - }); + }, true); case CEPH_OSD_OP_WRITEFULL: return do_write_op([&osd_op] (auto& backend, auto& os, auto& txn) { return backend.writefull(os, osd_op, txn); - }); + }, true); case CEPH_OSD_OP_SETALLOCHINT: return osd_op_errorator::now(); case CEPH_OSD_OP_SETXATTR: return do_write_op([&osd_op] (auto& backend, auto& os, auto& txn) { return backend.setxattr(os, osd_op, txn); - }); + }, true); case CEPH_OSD_OP_DELETE: return do_write_op([&osd_op] (auto& backend, auto& os, auto& txn) { return backend.remove(os, txn); - }); + }, true); case CEPH_OSD_OP_CALL: return this->do_op_call(osd_op); case CEPH_OSD_OP_STAT: @@ -724,13 +724,13 @@ OpsExecuter::execute_osd_op(OSDOp& osd_op) #endif return do_write_op([&osd_op] (auto& backend, auto& os, auto& txn) { return backend.omap_set_vals(os, osd_op, txn); - }); + }, true); // watch/notify case CEPH_OSD_OP_WATCH: return do_write_op([this, &osd_op] (auto& backend, auto& os, auto& txn) { return do_op_watch(osd_op, os, txn); - }); + }, false); case CEPH_OSD_OP_NOTIFY: return do_read_op([this, &osd_op] (auto&, const auto& os) { return do_op_notify(osd_op, os); diff --git a/src/crimson/osd/ops_executer.h b/src/crimson/osd/ops_executer.h index dd7da88ac50..390bf9e23dc 100644 --- a/src/crimson/osd/ops_executer.h +++ b/src/crimson/osd/ops_executer.h @@ -82,6 +82,7 @@ private: PG& pg; PGBackend& backend; Ref<MOSDOp> msg; + bool user_modify = false; ceph::os::Transaction txn; size_t num_read = 0; ///< count read ops @@ -144,8 +145,9 @@ private: } template <class Func> - auto do_write_op(Func&& f) { + auto do_write_op(Func&& f, bool um) { ++num_write; + user_modify = um; return std::forward<Func>(f)(backend, obc->obs, txn); } @@ -219,10 +221,21 @@ auto OpsExecuter::with_effect_on_obc( template <typename Func> OpsExecuter::osd_op_errorator::future<> OpsExecuter::submit_changes(Func&& f) && { + assert(obc); + osd_op_params_t osd_op_params(std::move(msg)); + eversion_t at_version = pg.next_version(); + + osd_op_params.at_version = at_version; + osd_op_params.pg_trim_to = pg.get_pg_trim_to(); + osd_op_params.min_last_complete_ondisk = pg.get_min_last_complete_ondisk(); + osd_op_params.last_complete = pg.get_info().last_complete; + if (user_modify) + osd_op_params.user_at_version = at_version.version; + if (__builtin_expect(op_effects.empty(), true)) { - return std::forward<Func>(f)(std::move(txn), std::move(obc)); + return std::forward<Func>(f)(std::move(txn), std::move(obc), std::move(osd_op_params)); } - return std::forward<Func>(f)(std::move(txn), std::move(obc)).safe_then([this] { + return std::forward<Func>(f)(std::move(txn), std::move(obc), std::move(osd_op_params)).safe_then([this] { // let's do the cleaning of `op_effects` in destructor return crimson::do_for_each(op_effects, [] (auto& op_effect) { return op_effect->execute(); diff --git a/src/crimson/osd/osd.cc b/src/crimson/osd/osd.cc index f0c1724f30e..01f93853577 100644 --- a/src/crimson/osd/osd.cc +++ b/src/crimson/osd/osd.cc @@ -14,6 +14,7 @@ #include "common/pick_address.h" #include "include/util.h" +#include "messages/MCommand.h" #include "messages/MOSDAlive.h" #include "messages/MOSDBeacon.h" #include "messages/MOSDBoot.h" @@ -77,7 +78,7 @@ OSD::OSD(int id, uint32_t nonce, shard_services{*this, *cluster_msgr, *public_msgr, *monc, *mgrc, *store}, heartbeat{new Heartbeat{shard_services, *monc, hb_front_msgr, hb_back_msgr}}, // do this in background - heartbeat_timer{[this] { (void)update_heartbeat_peers(); }}, + heartbeat_timer{[this] { update_heartbeat_peers(); }}, asok{seastar::make_lw_shared<crimson::admin::AdminSocket>()}, osdmap_gate("OSD::osdmap_gate", std::make_optional(std::ref(shard_services))) { @@ -411,6 +412,12 @@ seastar::future<> OSD::_send_alive() } } +seastar::future<> OSD::handle_command(crimson::net::Connection* conn, + Ref<MCommand> m) +{ + return asok->handle_command(conn, std::move(m)); +} + /* The OSD's Admin Socket object created here has two servers (i.e. - blocks of commands to handle) registered to it: @@ -574,6 +581,8 @@ seastar::future<> OSD::ms_dispatch(crimson::net::Connection* conn, MessageRef m) conn->get_shared(), m); return seastar::now(); + case MSG_COMMAND: + return handle_command(conn, boost::static_pointer_cast<MCommand>(m)); case MSG_OSD_PG_LEASE: [[fallthrough]]; case MSG_OSD_PG_LEASE_ACK: @@ -1040,10 +1049,10 @@ seastar::future<> OSD::send_beacon() return monc->send_message(m); } -seastar::future<> OSD::update_heartbeat_peers() +void OSD::update_heartbeat_peers() { if (!state.is_active()) { - return seastar::now(); + return; } for (auto& pg : pg_map.get_pgs()) { vector<int> up, acting; @@ -1058,7 +1067,7 @@ seastar::future<> OSD::update_heartbeat_peers() } } } - return heartbeat->update_peers(whoami); + heartbeat->update_peers(whoami); } seastar::future<> OSD::handle_peering_op( diff --git a/src/crimson/osd/osd.h b/src/crimson/osd/osd.h index 64f19aac1f7..be090fb90e1 100644 --- a/src/crimson/osd/osd.h +++ b/src/crimson/osd/osd.h @@ -31,6 +31,7 @@ #include "osd/osd_perf_counters.h" #include "osd/PGPeeringEvent.h" +class MCommand; class MOSDMap; class MOSDOp; class MOSDRepOpReply; @@ -186,6 +187,8 @@ private: void check_osdmap_features(); + seastar::future<> handle_command(crimson::net::Connection* conn, + Ref<MCommand> m); seastar::future<> start_asok_admin(); public: @@ -213,7 +216,7 @@ public: seastar::future<> shutdown(); seastar::future<> send_beacon(); - seastar::future<> update_heartbeat_peers(); + void update_heartbeat_peers(); friend class PGAdvanceMap; }; diff --git a/src/crimson/osd/osd_operations/osdop_params.h b/src/crimson/osd/osd_operations/osdop_params.h new file mode 100644 index 00000000000..b50fb2b5f78 --- /dev/null +++ b/src/crimson/osd/osd_operations/osdop_params.h @@ -0,0 +1,25 @@ +#pragma once + +#include "messages/MOSDOp.h" +#include "osd/osd_types.h" +#include "crimson/common/type_helpers.h" + +// The fields in this struct are parameters that may be needed in multiple +// level of processing. I inclosed all those parameters in this struct to +// avoid passing each of them as a method parameter. +struct osd_op_params_t { + Ref<MOSDOp> req; + eversion_t at_version; + eversion_t pg_trim_to; + eversion_t min_last_complete_ondisk; + eversion_t last_complete; + version_t user_at_version; + bool user_modify = false; + + osd_op_params_t(Ref<MOSDOp>&& req) : req(req) {} + osd_op_params_t(Ref<MOSDOp>&& req, eversion_t at_version, eversion_t pg_trim_to, + eversion_t mlcod, eversion_t lc, version_t user_at_version) : + req(req), at_version(at_version), pg_trim_to(pg_trim_to), + min_last_complete_ondisk(mlcod), last_complete(lc), + user_at_version(user_at_version) {} +}; diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 4a60f385cbb..fcef9c45aa1 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -35,6 +35,7 @@ #include "crimson/osd/pg_meta.h" #include "crimson/osd/pg_backend.h" #include "crimson/osd/ops_executer.h" +#include "crimson/osd/osd_operations/osdop_params.h" #include "crimson/osd/osd_operations/peering_event.h" namespace { @@ -490,21 +491,33 @@ blocking_future<> PG::WaitForActiveBlocker::wait() seastar::future<> PG::submit_transaction(ObjectContextRef&& obc, ceph::os::Transaction&& txn, - const MOSDOp& req) + const osd_op_params_t& osd_op_p) { epoch_t map_epoch = get_osdmap_epoch(); - eversion_t at_version{map_epoch, projected_last_update.version + 1}; + + std::vector<pg_log_entry_t> log_entries; + log_entries.emplace_back(obc->obs.exists ? + pg_log_entry_t::MODIFY : pg_log_entry_t::DELETE, + obc->obs.oi.soid, osd_op_p.at_version, obc->obs.oi.version, + osd_op_p.user_modify ? osd_op_p.at_version.version : 0, + osd_op_p.req->get_reqid(), osd_op_p.req->get_mtime(), 0); + peering_state.append_log_with_trim_to_updated(std::move(log_entries), osd_op_p.at_version, + txn, true, false); + return backend->mutate_object(peering_state.get_acting_recovery_backfill(), std::move(obc), std::move(txn), - req, + std::move(osd_op_p), peering_state.get_last_peering_reset(), map_epoch, - at_version).then([this](auto acked) { + std::move(log_entries)).then( + [this, last_complete=peering_state.get_info().last_complete, + at_version=osd_op_p.at_version](auto acked) { for (const auto& peer : acked) { peering_state.update_peer_last_complete_ondisk( peer.shard, peer.last_complete_ondisk); } + peering_state.complete_write(at_version, last_complete); return seastar::now(); }); } @@ -518,6 +531,7 @@ seastar::future<Ref<MOSDOpReply>> PG::do_osd_ops( : m->get_hobj(); auto ox = std::make_unique<OpsExecuter>(obc, *this/* as const& */, m); + return crimson::do_for_each( m->ops, [obc, m, ox = ox.get()](OSDOp& osd_op) { logger().debug( @@ -531,10 +545,10 @@ seastar::future<Ref<MOSDOpReply>> PG::do_osd_ops( "do_osd_ops: {} - object {} all operations successful", *m, obc->obs.oi.soid); - return std::move(*ox).submit_changes( - [this, m] (auto&& txn, auto&& obc) -> osd_op_errorator::future<> { - // XXX: the entire lambda could be scheduled conditionally. ::if_then()? - if (txn.empty()) { + return std::move(*ox).submit_changes([this, m] + (auto&& txn, auto&& obc, auto&& osd_op_p) -> osd_op_errorator::future<> { + // XXX: the entire lambda could be scheduled conditionally. ::if_then()? + if (txn.empty()) { logger().debug( "do_osd_ops: {} - object {} txn is empty, bypassing mutate", *m, @@ -545,8 +559,9 @@ seastar::future<Ref<MOSDOpReply>> PG::do_osd_ops( "do_osd_ops: {} - object {} submitting txn", *m, obc->obs.oi.soid); - return submit_transaction(std::move(obc), std::move(txn), *m); - } + return submit_transaction(std::move(obc), std::move(txn), + std::move(osd_op_p)); + } }); }).safe_then([m, obc, this, ox_deleter = std::move(ox)] { auto reply = make_message<MOSDOpReply>(m.get(), 0, get_osdmap_epoch(), @@ -790,6 +805,11 @@ seastar::future<> PG::handle_rep_op(Ref<MOSDRepOp> req) ceph::os::Transaction txn; auto encoded_txn = req->get_data().cbegin(); decode(txn, encoded_txn); + auto p = req->logbl.cbegin(); + std::vector<pg_log_entry_t> log_entries; + decode(log_entries, p); + peering_state.append_log(std::move(log_entries), req->pg_trim_to, + req->version, req->min_last_complete_ondisk, txn, !txn.empty(), false); return shard_services.get_store().do_transaction(coll_ref, std::move(txn)) .then([req, lcod=peering_state.get_info().last_complete, this] { peering_state.update_last_complete_ondisk(lcod); diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index 7ec64d319c7..aa5945f1abe 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -30,6 +30,8 @@ class OSDMap; class MQuery; class PGBackend; class PGPeeringEvent; +class osd_op_params_t; + namespace recovery { class Context; } @@ -98,6 +100,18 @@ public: return peering_state.get_osdmap_epoch(); } + eversion_t get_pg_trim_to() const { + return peering_state.get_pg_trim_to(); + } + + eversion_t get_min_last_complete_ondisk() const { + return peering_state.get_min_last_complete_ondisk(); + } + + const pg_info_t& get_info() const { + return peering_state.get_info(); + } + // DoutPrefixProvider std::ostream& gen_prefix(std::ostream& out) const final { return out << *this; @@ -478,7 +492,7 @@ private: uint64_t limit); seastar::future<> submit_transaction(ObjectContextRef&& obc, ceph::os::Transaction&& txn, - const MOSDOp& req); + const osd_op_params_t& oop); private: OSDMapGate osdmap_gate; @@ -488,6 +502,10 @@ private: public: cached_map_t get_osdmap() { return osdmap; } + eversion_t next_version() { + return eversion_t(projected_last_update.epoch, + ++projected_last_update.version); + } private: std::unique_ptr<PGBackend> backend; diff --git a/src/crimson/osd/pg_backend.cc b/src/crimson/osd/pg_backend.cc index 3394daeaccf..72f32f61881 100644 --- a/src/crimson/osd/pg_backend.cc +++ b/src/crimson/osd/pg_backend.cc @@ -119,10 +119,10 @@ PGBackend::mutate_object( std::set<pg_shard_t> pg_shards, crimson::osd::ObjectContextRef &&obc, ceph::os::Transaction&& txn, - const MOSDOp& m, + const osd_op_params_t& osd_op_p, epoch_t min_epoch, epoch_t map_epoch, - eversion_t ver) + std::vector<pg_log_entry_t>&& log_entries) { logger().trace("mutate_object: num_ops={}", txn.get_num_ops()); if (obc->obs.exists) { @@ -131,8 +131,13 @@ PGBackend::mutate_object( obc->obs.oi.prior_version = ctx->obs->oi.version; #endif - obc->obs.oi.last_reqid = m.get_reqid(); - obc->obs.oi.mtime = m.get_mtime(); + auto& m = osd_op_p.req; + obc->obs.oi.prior_version = obc->obs.oi.version; + obc->obs.oi.version = osd_op_p.at_version; + if (osd_op_p.user_at_version > obc->obs.oi.user_version) + obc->obs.oi.user_version = osd_op_p.user_at_version; + obc->obs.oi.last_reqid = m->get_reqid(); + obc->obs.oi.mtime = m->get_mtime(); obc->obs.oi.local_mtime = ceph_clock_now(); // object_info_t @@ -148,7 +153,7 @@ PGBackend::mutate_object( } return _submit_transaction( std::move(pg_shards), obc->obs.oi.soid, std::move(txn), - m.get_reqid(), min_epoch, map_epoch, ver); + std::move(osd_op_p), min_epoch, map_epoch, std::move(log_entries)); } static inline bool _read_verify_data( diff --git a/src/crimson/osd/pg_backend.h b/src/crimson/osd/pg_backend.h index ae55fd289bf..13dfb30cff3 100644 --- a/src/crimson/osd/pg_backend.h +++ b/src/crimson/osd/pg_backend.h @@ -14,6 +14,7 @@ #include "crimson/common/shared_lru.h" #include "osd/osd_types.h" #include "crimson/osd/object_context.h" +#include "crimson/osd/osd_operations/osdop_params.h" struct hobject_t; class MOSDRepOpReply; @@ -78,10 +79,10 @@ public: std::set<pg_shard_t> pg_shards, crimson::osd::ObjectContextRef &&obc, ceph::os::Transaction&& txn, - const MOSDOp& m, + const osd_op_params_t& osd_op_p, epoch_t min_epoch, epoch_t map_epoch, - eversion_t ver); + std::vector<pg_log_entry_t>&& log_entries); seastar::future<std::vector<hobject_t>, hobject_t> list_objects( const hobject_t& start, uint64_t limit) const; @@ -142,7 +143,7 @@ private: _submit_transaction(std::set<pg_shard_t>&& pg_shards, const hobject_t& hoid, ceph::os::Transaction&& txn, - osd_reqid_t req_id, + const osd_op_params_t& osd_op_p, epoch_t min_epoch, epoch_t max_epoch, - eversion_t ver) = 0; + std::vector<pg_log_entry_t>&& log_entries) = 0; }; diff --git a/src/crimson/osd/replicated_backend.cc b/src/crimson/osd/replicated_backend.cc index 5d42375e092..76f4539fa86 100644 --- a/src/crimson/osd/replicated_backend.cc +++ b/src/crimson/osd/replicated_backend.cc @@ -9,6 +9,8 @@ #include "crimson/os/cyanstore/cyan_object.h" #include "crimson/os/futurized_store.h" #include "crimson/osd/shard_services.h" +#include "crimson/osd/pg.h" +#include "osd/PeeringState.h" namespace { seastar::logger& logger() { @@ -39,11 +41,12 @@ seastar::future<crimson::osd::acked_peers_t> ReplicatedBackend::_submit_transaction(std::set<pg_shard_t>&& pg_shards, const hobject_t& hoid, ceph::os::Transaction&& txn, - osd_reqid_t req_id, + const osd_op_params_t& osd_op_p, epoch_t min_epoch, epoch_t map_epoch, - eversion_t ver) + std::vector<pg_log_entry_t>&& log_entries) { const ceph_tid_t tid = next_txn_id++; + auto req_id = osd_op_p.req->get_reqid(); auto pending_txn = pending_trans.emplace(tid, pending_on_t{pg_shards.size()}).first; bufferlist encoded_txn; @@ -59,9 +62,13 @@ ReplicatedBackend::_submit_transaction(std::set<pg_shard_t>&& pg_shards, spg_t{pgid, pg_shard.shard}, hoid, CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK, map_epoch, min_epoch, - tid, ver); + tid, osd_op_p.at_version); m->set_data(encoded_txn); pending_txn->second.acked_peers.push_back({pg_shard, eversion_t{}}); + encode(log_entries, m->logbl); + m->pg_trim_to = osd_op_p.pg_trim_to; + m->min_last_complete_ondisk = osd_op_p.min_last_complete_ondisk; + m->set_rollback_to(osd_op_p.at_version); // TODO: set more stuff. e.g., pg_states return shard_services.send_to_osd(pg_shard.osd, std::move(m), map_epoch); } diff --git a/src/crimson/osd/replicated_backend.h b/src/crimson/osd/replicated_backend.h index c61d2b88d0e..53a0038da8a 100644 --- a/src/crimson/osd/replicated_backend.h +++ b/src/crimson/osd/replicated_backend.h @@ -31,9 +31,9 @@ private: _submit_transaction(std::set<pg_shard_t>&& pg_shards, const hobject_t& hoid, ceph::os::Transaction&& txn, - osd_reqid_t req_id, + const osd_op_params_t& osd_op_p, epoch_t min_epoch, epoch_t max_epoch, - eversion_t ver) final; + std::vector<pg_log_entry_t>&& log_entries) final; const pg_t pgid; const pg_shard_t whoami; crimson::osd::ShardServices& shard_services; diff --git a/src/crypto/openssl/openssl_crypto_accel.cc b/src/crypto/openssl/openssl_crypto_accel.cc index 156a2771e09..2eae7530684 100644 --- a/src/crypto/openssl/openssl_crypto_accel.cc +++ b/src/crypto/openssl/openssl_crypto_accel.cc @@ -13,8 +13,68 @@ */ #include "crypto/openssl/openssl_crypto_accel.h" -#include <openssl/aes.h> +#include <openssl/evp.h> +#include <openssl/engine.h> +#include "common/debug.h" +// ----------------------------------------------------------------------------- +#define dout_context g_ceph_context +#define dout_subsys ceph_subsys_crypto +#undef dout_prefix +#define dout_prefix _prefix(_dout) + +static ostream& +_prefix(std::ostream* _dout) +{ + return *_dout << "OpensslCryptoAccel: "; +} +// ----------------------------------------------------------------------------- + +#define EVP_SUCCESS 1 +#define AES_ENCRYPT 1 +#define AES_DECRYPT 0 + +bool evp_transform(unsigned char* out, const unsigned char* in, size_t size, + const unsigned char* iv, + const unsigned char* key, + ENGINE* engine, + const EVP_CIPHER* const type, + const int encrypt) +{ + using pctx_t = std::unique_ptr<EVP_CIPHER_CTX, decltype(&::EVP_CIPHER_CTX_free)>; + pctx_t pctx{ EVP_CIPHER_CTX_new(), EVP_CIPHER_CTX_free }; + + if (!pctx) { + derr << "failed to create evp cipher context" << dendl; + return false; + } + + if (EVP_CipherInit_ex(pctx.get(), type, engine, key, iv, encrypt) != EVP_SUCCESS) { + derr << "EVP_CipherInit_ex failed" << dendl; + return false; + } + + if (EVP_CIPHER_CTX_set_padding(pctx.get(), 0) != EVP_SUCCESS) { + derr << "failed to disable PKCS padding" << dendl; + return false; + } + + int len_update = 0; + if (EVP_CipherUpdate(pctx.get(), out, &len_update, in, size) != EVP_SUCCESS) { + derr << "EVP_CipherUpdate failed" << dendl; + return false; + } + + int len_final = 0; + if (EVP_CipherFinal_ex(pctx.get(), out + len_update, &len_final) != EVP_SUCCESS) { + derr << "EVP_CipherFinal_ex failed" << dendl; + return false; + } + + ceph_assert(len_final == 0); + return (len_update + len_final) == static_cast<int>(size); +} + bool OpenSSLCryptoAccel::cbc_encrypt(unsigned char* out, const unsigned char* in, size_t size, const unsigned char (&iv)[AES_256_IVSIZE], const unsigned char (&key)[AES_256_KEYSIZE]) @@ -23,14 +83,12 @@ bool OpenSSLCryptoAccel::cbc_encrypt(unsigned char* out, const unsigned char* in return false; } - AES_KEY aes_key; - if (AES_set_encrypt_key(const_cast<unsigned char*>(&key[0]), 256, &aes_key) < 0) - return false; - - AES_cbc_encrypt(const_cast<unsigned char*>(in), out, size, &aes_key, - const_cast<unsigned char*>(&iv[0]), AES_ENCRYPT); - return true; + return evp_transform(out, in, size, const_cast<unsigned char*>(&iv[0]), + const_cast<unsigned char*>(&key[0]), + nullptr, // Hardware acceleration engine can be used in the future + EVP_aes_256_cbc(), AES_ENCRYPT); } + bool OpenSSLCryptoAccel::cbc_decrypt(unsigned char* out, const unsigned char* in, size_t size, const unsigned char (&iv)[AES_256_IVSIZE], const unsigned char (&key)[AES_256_KEYSIZE]) @@ -39,11 +97,8 @@ bool OpenSSLCryptoAccel::cbc_decrypt(unsigned char* out, const unsigned char* in return false; } - AES_KEY aes_key; - if (AES_set_decrypt_key(const_cast<unsigned char*>(&key[0]), 256, &aes_key) < 0) - return false; - - AES_cbc_encrypt(const_cast<unsigned char*>(in), out, size, &aes_key, - const_cast<unsigned char*>(&iv[0]), AES_DECRYPT); - return true; + return evp_transform(out, in, size, const_cast<unsigned char*>(&iv[0]), + const_cast<unsigned char*>(&key[0]), + nullptr, // Hardware acceleration engine can be used in the future + EVP_aes_256_cbc(), AES_DECRYPT); } diff --git a/src/erasure-code/CMakeLists.txt b/src/erasure-code/CMakeLists.txt index bd9b00460b4..9cdc62e7dcb 100644 --- a/src/erasure-code/CMakeLists.txt +++ b/src/erasure-code/CMakeLists.txt @@ -22,10 +22,10 @@ add_subdirectory(lrc) add_subdirectory(shec) add_subdirectory(clay) -if (HAVE_BETTER_YASM_ELF64) +if(HAVE_BETTER_YASM_ELF64 OR HAVE_ARMV8_SIMD) add_subdirectory(isa) set(EC_ISA_LIB ec_isa) -endif (HAVE_BETTER_YASM_ELF64) +endif() add_library(erasure_code STATIC ErasureCodePlugin.cc) target_link_libraries(erasure_code ${CMAKE_DL_LIBS}) diff --git a/src/erasure-code/isa/CMakeLists.txt b/src/erasure-code/isa/CMakeLists.txt index cc489211253..5043ac225dc 100644 --- a/src/erasure-code/isa/CMakeLists.txt +++ b/src/erasure-code/isa/CMakeLists.txt @@ -2,61 +2,90 @@ set(isal_src_dir ${CMAKE_SOURCE_DIR}/src/isa-l) include_directories(${isal_src_dir}/include) -set(isa_srcs - ${isal_src_dir}/erasure_code/ec_base.c - ${isal_src_dir}/erasure_code/gf_2vect_dot_prod_sse.asm - ${isal_src_dir}/erasure_code/gf_3vect_dot_prod_sse.asm - ${isal_src_dir}/erasure_code/gf_4vect_dot_prod_sse.asm - ${isal_src_dir}/erasure_code/gf_5vect_dot_prod_sse.asm - ${isal_src_dir}/erasure_code/gf_6vect_dot_prod_sse.asm - ${isal_src_dir}/erasure_code/gf_vect_dot_prod_sse.asm - ${isal_src_dir}/erasure_code/gf_2vect_mad_avx2.asm - ${isal_src_dir}/erasure_code/gf_3vect_mad_avx2.asm - ${isal_src_dir}/erasure_code/gf_4vect_mad_avx2.asm - ${isal_src_dir}/erasure_code/gf_5vect_mad_avx2.asm - ${isal_src_dir}/erasure_code/gf_6vect_mad_avx2.asm - ${isal_src_dir}/erasure_code/gf_vect_mad_avx2.asm - ${isal_src_dir}/erasure_code/ec_highlevel_func.c - ${isal_src_dir}/erasure_code/gf_2vect_mad_avx.asm - ${isal_src_dir}/erasure_code/gf_3vect_mad_avx.asm - ${isal_src_dir}/erasure_code/gf_4vect_mad_avx.asm - ${isal_src_dir}/erasure_code/gf_5vect_mad_avx.asm - ${isal_src_dir}/erasure_code/gf_6vect_mad_avx.asm - ${isal_src_dir}/erasure_code/gf_vect_mad_avx.asm - ${isal_src_dir}/erasure_code/ec_multibinary.asm - ${isal_src_dir}/erasure_code/gf_2vect_mad_sse.asm - ${isal_src_dir}/erasure_code/gf_3vect_mad_sse.asm - ${isal_src_dir}/erasure_code/gf_4vect_mad_sse.asm - ${isal_src_dir}/erasure_code/gf_5vect_mad_sse.asm - ${isal_src_dir}/erasure_code/gf_6vect_mad_sse.asm - ${isal_src_dir}/erasure_code/gf_vect_mad_sse.asm - ${isal_src_dir}/erasure_code/gf_2vect_dot_prod_avx2.asm - ${isal_src_dir}/erasure_code/gf_3vect_dot_prod_avx2.asm - ${isal_src_dir}/erasure_code/gf_4vect_dot_prod_avx2.asm - ${isal_src_dir}/erasure_code/gf_5vect_dot_prod_avx2.asm - ${isal_src_dir}/erasure_code/gf_6vect_dot_prod_avx2.asm - ${isal_src_dir}/erasure_code/gf_vect_dot_prod_avx2.asm - ${isal_src_dir}/erasure_code/gf_vect_mul_avx.asm - ${isal_src_dir}/erasure_code/gf_2vect_dot_prod_avx.asm - ${isal_src_dir}/erasure_code/gf_3vect_dot_prod_avx.asm - ${isal_src_dir}/erasure_code/gf_4vect_dot_prod_avx.asm - ${isal_src_dir}/erasure_code/gf_5vect_dot_prod_avx.asm - ${isal_src_dir}/erasure_code/gf_6vect_dot_prod_avx.asm - ${isal_src_dir}/erasure_code/gf_vect_dot_prod_avx.asm - ${isal_src_dir}/erasure_code/gf_vect_mul_sse.asm - ${isal_src_dir}/erasure_code/gf_2vect_dot_prod_avx512.asm - ${isal_src_dir}/erasure_code/gf_2vect_mad_avx512.asm - ${isal_src_dir}/erasure_code/gf_3vect_dot_prod_avx512.asm - ${isal_src_dir}/erasure_code/gf_3vect_mad_avx512.asm - ${isal_src_dir}/erasure_code/gf_4vect_dot_prod_avx512.asm - ${isal_src_dir}/erasure_code/gf_4vect_mad_avx512.asm - ${isal_src_dir}/erasure_code/gf_vect_dot_prod_avx512.asm - ${isal_src_dir}/erasure_code/gf_vect_mad_avx512.asm - ErasureCodeIsa.cc - ErasureCodeIsaTableCache.cc - ErasureCodePluginIsa.cc - xor_op.cc -) +if(HAVE_BETTER_YASM_ELF64) + set(isa_srcs + ${isal_src_dir}/erasure_code/ec_base.c + ${isal_src_dir}/erasure_code/gf_2vect_dot_prod_sse.asm + ${isal_src_dir}/erasure_code/gf_3vect_dot_prod_sse.asm + ${isal_src_dir}/erasure_code/gf_4vect_dot_prod_sse.asm + ${isal_src_dir}/erasure_code/gf_5vect_dot_prod_sse.asm + ${isal_src_dir}/erasure_code/gf_6vect_dot_prod_sse.asm + ${isal_src_dir}/erasure_code/gf_vect_dot_prod_sse.asm + ${isal_src_dir}/erasure_code/gf_2vect_mad_avx2.asm + ${isal_src_dir}/erasure_code/gf_3vect_mad_avx2.asm + ${isal_src_dir}/erasure_code/gf_4vect_mad_avx2.asm + ${isal_src_dir}/erasure_code/gf_5vect_mad_avx2.asm + ${isal_src_dir}/erasure_code/gf_6vect_mad_avx2.asm + ${isal_src_dir}/erasure_code/gf_vect_mad_avx2.asm + ${isal_src_dir}/erasure_code/ec_highlevel_func.c + ${isal_src_dir}/erasure_code/gf_2vect_mad_avx.asm + ${isal_src_dir}/erasure_code/gf_3vect_mad_avx.asm + ${isal_src_dir}/erasure_code/gf_4vect_mad_avx.asm + ${isal_src_dir}/erasure_code/gf_5vect_mad_avx.asm + ${isal_src_dir}/erasure_code/gf_6vect_mad_avx.asm + ${isal_src_dir}/erasure_code/gf_vect_mad_avx.asm + ${isal_src_dir}/erasure_code/ec_multibinary.asm + ${isal_src_dir}/erasure_code/gf_2vect_mad_sse.asm + ${isal_src_dir}/erasure_code/gf_3vect_mad_sse.asm + ${isal_src_dir}/erasure_code/gf_4vect_mad_sse.asm + ${isal_src_dir}/erasure_code/gf_5vect_mad_sse.asm + ${isal_src_dir}/erasure_code/gf_6vect_mad_sse.asm + ${isal_src_dir}/erasure_code/gf_vect_mad_sse.asm + ${isal_src_dir}/erasure_code/gf_2vect_dot_prod_avx2.asm + ${isal_src_dir}/erasure_code/gf_3vect_dot_prod_avx2.asm + ${isal_src_dir}/erasure_code/gf_4vect_dot_prod_avx2.asm + ${isal_src_dir}/erasure_code/gf_5vect_dot_prod_avx2.asm + ${isal_src_dir}/erasure_code/gf_6vect_dot_prod_avx2.asm + ${isal_src_dir}/erasure_code/gf_vect_dot_prod_avx2.asm + ${isal_src_dir}/erasure_code/gf_vect_mul_avx.asm + ${isal_src_dir}/erasure_code/gf_2vect_dot_prod_avx.asm + ${isal_src_dir}/erasure_code/gf_3vect_dot_prod_avx.asm + ${isal_src_dir}/erasure_code/gf_4vect_dot_prod_avx.asm + ${isal_src_dir}/erasure_code/gf_5vect_dot_prod_avx.asm + ${isal_src_dir}/erasure_code/gf_6vect_dot_prod_avx.asm + ${isal_src_dir}/erasure_code/gf_vect_dot_prod_avx.asm + ${isal_src_dir}/erasure_code/gf_vect_mul_sse.asm + ${isal_src_dir}/erasure_code/gf_2vect_dot_prod_avx512.asm + ${isal_src_dir}/erasure_code/gf_2vect_mad_avx512.asm + ${isal_src_dir}/erasure_code/gf_3vect_dot_prod_avx512.asm + ${isal_src_dir}/erasure_code/gf_3vect_mad_avx512.asm + ${isal_src_dir}/erasure_code/gf_4vect_dot_prod_avx512.asm + ${isal_src_dir}/erasure_code/gf_4vect_mad_avx512.asm + ${isal_src_dir}/erasure_code/gf_vect_dot_prod_avx512.asm + ${isal_src_dir}/erasure_code/gf_vect_mad_avx512.asm + ErasureCodeIsa.cc + ErasureCodeIsaTableCache.cc + ErasureCodePluginIsa.cc + xor_op.cc + ) +elseif(HAVE_ARMV8_SIMD) + set(isa_srcs + ${isal_src_dir}/erasure_code/ec_base.c + ${isal_src_dir}/erasure_code/aarch64/ec_aarch64_highlevel_func.c + ${isal_src_dir}/erasure_code/aarch64/ec_aarch64_dispatcher.c + ${isal_src_dir}/erasure_code/aarch64/gf_2vect_dot_prod_neon.S + ${isal_src_dir}/erasure_code/aarch64/gf_2vect_mad_neon.S + ${isal_src_dir}/erasure_code/aarch64/gf_3vect_dot_prod_neon.S + ${isal_src_dir}/erasure_code/aarch64/gf_3vect_mad_neon.S + ${isal_src_dir}/erasure_code/aarch64/gf_4vect_dot_prod_neon.S + ${isal_src_dir}/erasure_code/aarch64/gf_4vect_mad_neon.S + ${isal_src_dir}/erasure_code/aarch64/gf_5vect_dot_prod_neon.S + ${isal_src_dir}/erasure_code/aarch64/gf_5vect_mad_neon.S + ${isal_src_dir}/erasure_code/aarch64/gf_6vect_mad_neon.S + ${isal_src_dir}/erasure_code/aarch64/gf_vect_dot_prod_neon.S + ${isal_src_dir}/erasure_code/aarch64/gf_vect_mad_neon.S + ${isal_src_dir}/erasure_code/aarch64/gf_vect_mul_neon.S + ${isal_src_dir}/erasure_code/aarch64/ec_multibinary_arm.S + ErasureCodeIsa.cc + ErasureCodeIsaTableCache.cc + ErasureCodePluginIsa.cc + xor_op.cc + ) + set_source_files_properties( + ${isal_src_dir}/erasure_code/aarch64/ec_multibinary_arm.S + PROPERTIES COMPILE_FLAGS "-D__ASSEMBLY__" + ) +endif() add_library(ec_isa SHARED ${isa_srcs} diff --git a/src/include/compact_set.h b/src/include/compact_set.h index 7a9c0336f0a..a364fd8c48d 100644 --- a/src/include/compact_set.h +++ b/src/include/compact_set.h @@ -271,7 +271,7 @@ public: decode(n, p); if (n > 0) { alloc_internal(); - decode_nohead(n, *set, p); + ceph::decode_nohead(n, *set, p); } else free_internal(); } diff --git a/src/include/config-h.in.cmake b/src/include/config-h.in.cmake index 1eb7807ed4a..31dfb8983a7 100644 --- a/src/include/config-h.in.cmake +++ b/src/include/config-h.in.cmake @@ -238,6 +238,9 @@ /* yasm can also build the isa-l */ #cmakedefine HAVE_BETTER_YASM_ELF64 +/* Define if isa-l is compiled for arm64 */ +#cmakedefine HAVE_ARMV8_SIMD + /* Define to 1 if strerror_r returns char *. */ #cmakedefine STRERROR_R_CHAR_P 1 diff --git a/src/include/filepath.h b/src/include/filepath.h index 7241e5e0cf7..a9f09626588 100644 --- a/src/include/filepath.h +++ b/src/include/filepath.h @@ -38,14 +38,14 @@ class filepath { inodeno_t ino; // base inode. ino=0 implies pure relative path. - string path; // relative path. + std::string path; // relative path. /** bits - path segments * this is ['a', 'b', 'c'] for both the aboslute and relative case. * * NOTE: this value is LAZILY maintained... i.e. it's a cache */ - mutable vector<string> bits; + mutable std::vector<std::string> bits; bool encoded; void rebuild_path() { @@ -74,7 +74,7 @@ class filepath { public: filepath() : ino(0), encoded(false) { } filepath(std::string_view s, inodeno_t i) : ino(i), path(s), encoded(false) { } - filepath(const string& s, inodeno_t i) : ino(i), path(s), encoded(false) { } + filepath(const std::string& s, inodeno_t i) : ino(i), path(s), encoded(false) { } filepath(const char* s, inodeno_t i) : ino(i), path(s), encoded(false) { } filepath(const filepath& o) { ino = o.ino; @@ -83,7 +83,7 @@ class filepath { encoded = o.encoded; } filepath(inodeno_t i) : ino(i), encoded(false) { } - + /* * if we are fed a relative path as a string, either set ino=0 (strictly * relative) or 1 (absolute). throw out any leading '/'. @@ -113,7 +113,7 @@ class filepath { // accessors inodeno_t get_ino() const { return ino; } - const string& get_path() const { return path; } + const std::string& get_path() const { return path; } const char *c_str() const { return path.c_str(); } int length() const { return path.length(); } @@ -126,13 +126,13 @@ class filepath { bool absolute() const { return ino == 1; } bool pure_relative() const { return ino == 0; } bool ino_relative() const { return ino > 0; } - - const string& operator[](int i) const { + + const std::string& operator[](int i) const { if (bits.empty() && path.length() > 0) parse_bits(); return bits[i]; } - const string& last_dentry() const { + const std::string& last_dentry() const { if (bits.empty() && path.length() > 0) parse_bits(); ceph_assert(!bits.empty()); return bits[ bits.size()-1 ]; @@ -166,7 +166,7 @@ class filepath { parse_bits(); bits.pop_back(); rebuild_path(); - } + } void push_dentry(std::string_view s) { if (bits.empty() && path.length() > 0) parse_bits(); @@ -175,13 +175,13 @@ class filepath { path += s; bits.emplace_back(s); } - void push_dentry(const string& s) { + void push_dentry(const std::string& s) { push_dentry(std::string_view(s)); } void push_dentry(const char *cs) { push_dentry(std::string_view(cs, strlen(cs))); } - void push_front_dentry(const string& s) { + void push_front_dentry(const std::string& s) { bits.insert(bits.begin(), s); rebuild_path(); } @@ -192,14 +192,14 @@ class filepath { } // encoding - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; __u8 struct_v = 1; encode(struct_v, bl); encode(ino, bl); encode(path, bl); } - void decode(bufferlist::const_iterator& blp) { + void decode(ceph::buffer::list::const_iterator& blp) { using ceph::decode; bits.clear(); __u8 struct_v; @@ -208,11 +208,11 @@ class filepath { decode(path, blp); encoded = true; } - void dump(Formatter *f) const { + void dump(ceph::Formatter *f) const { f->dump_unsigned("base_ino", ino); f->dump_string("relative_path", path); } - static void generate_test_instances(list<filepath*>& o) { + static void generate_test_instances(std::list<filepath*>& o) { o.push_back(new filepath); o.push_back(new filepath("/usr/bin", 0)); o.push_back(new filepath("/usr/sbin", 1)); @@ -239,7 +239,7 @@ class filepath { WRITE_CLASS_ENCODER(filepath) -inline ostream& operator<<(ostream& out, const filepath& path) +inline std::ostream& operator<<(std::ostream& out, const filepath& path) { if (path.get_ino()) { out << '#' << path.get_ino(); diff --git a/src/include/frag.h b/src/include/frag.h index de532d63af4..699a0698f5c 100644 --- a/src/include/frag.h +++ b/src/include/frag.h @@ -151,12 +151,12 @@ public: return false; } - void encode(bufferlist& bl) const { - encode_raw(_enc, bl); + void encode(ceph::buffer::list& bl) const { + ceph::encode_raw(_enc, bl); } - void decode(bufferlist::const_iterator& p) { + void decode(ceph::buffer::list::const_iterator& p) { __u32 v; - decode_raw(v, p); + ceph::decode_raw(v, p); _enc = v; } bool operator<(const frag_t& b) const @@ -182,8 +182,8 @@ inline std::ostream& operator<<(std::ostream& out, const frag_t& hb) return out << '*'; } -inline void encode(const frag_t &f, bufferlist& bl) { f.encode(bl); } -inline void decode(frag_t &f, bufferlist::const_iterator& p) { f.decode(p); } +inline void encode(const frag_t &f, ceph::buffer::list& bl) { f.encode(bl); } +inline void decode(frag_t &f, ceph::buffer::list::const_iterator& p) { f.decode(p); } using frag_vec_t = boost::container::small_vector<frag_t, 4>; @@ -464,15 +464,15 @@ public: } // encoding - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; encode(_splits, bl); } - void decode(bufferlist::const_iterator& p) { + void decode(ceph::buffer::list::const_iterator& p) { using ceph::decode; decode(_splits, p); } - void encode_nohead(bufferlist& bl) const { + void encode_nohead(ceph::buffer::list& bl) const { using ceph::encode; for (compact_map<frag_t,int32_t>::const_iterator p = _splits.begin(); p != _splits.end(); @@ -481,7 +481,7 @@ public: encode(p->second, bl); } } - void decode_nohead(int n, bufferlist::const_iterator& p) { + void decode_nohead(int n, ceph::buffer::list::const_iterator& p) { using ceph::decode; _splits.clear(); while (n-- > 0) { @@ -514,11 +514,9 @@ public: out << ")"; } - void dump(Formatter *f) const { + void dump(ceph::Formatter *f) const { f->open_array_section("splits"); - for (compact_map<frag_t,int32_t>::const_iterator p = _splits.begin(); - p != _splits.end(); - ++p) { + for (auto p = _splits.begin(); p != _splits.end(); ++p) { f->open_object_section("split"); std::ostringstream frag_str; frag_str << p->first; diff --git a/src/include/types.h b/src/include/types.h index 79826105b05..c2d3c621600 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -574,7 +574,7 @@ struct sha_digest_t { for (size_t i = 0; i < S; i++) { ::sprintf(&str[i * 2], "%02x", static_cast<int>(v[i])); } - return string(str); + return std::string(str); } sha_digest_t(const unsigned char *_v) { memcpy(v, _v, SIZE); }; sha_digest_t() {} diff --git a/src/isa-l b/src/isa-l -Subproject 7e1a337433a340bc0974ed0f04301bdaca374af +Subproject 806b55ee578efd8158962b90121a4568eb1ecb6 diff --git a/src/kv/RocksDBStore.cc b/src/kv/RocksDBStore.cc index 328277e52a3..b52cf3711ba 100644 --- a/src/kv/RocksDBStore.cc +++ b/src/kv/RocksDBStore.cc @@ -355,7 +355,7 @@ int RocksDBStore::load_rocksdb_options(bool create_if_missing, rocksdb::Options& } } - if (g_conf()->rocksdb_perf) { + if (cct->_conf->rocksdb_perf) { dbstats = rocksdb::CreateDBStatistics(); opt.statistics = dbstats; } @@ -394,8 +394,8 @@ int RocksDBStore::load_rocksdb_options(bool create_if_missing, rocksdb::Options& return -e.code().value(); } - if (g_conf()->rocksdb_log_to_ceph_log) { - opt.info_log.reset(new CephRocksdbLogger(g_ceph_context)); + if (cct->_conf->rocksdb_log_to_ceph_log) { + opt.info_log.reset(new CephRocksdbLogger(cct)); } if (priv) { @@ -407,78 +407,78 @@ int RocksDBStore::load_rocksdb_options(bool create_if_missing, rocksdb::Options& // caches if (!set_cache_flag) { - cache_size = g_conf()->rocksdb_cache_size; + cache_size = cct->_conf->rocksdb_cache_size; } - uint64_t row_cache_size = cache_size * g_conf()->rocksdb_cache_row_ratio; + uint64_t row_cache_size = cache_size * cct->_conf->rocksdb_cache_row_ratio; uint64_t block_cache_size = cache_size - row_cache_size; - if (g_conf()->rocksdb_cache_type == "binned_lru") { + if (cct->_conf->rocksdb_cache_type == "binned_lru") { bbt_opts.block_cache = rocksdb_cache::NewBinnedLRUCache( cct, block_cache_size, - g_conf()->rocksdb_cache_shard_bits); - } else if (g_conf()->rocksdb_cache_type == "lru") { + cct->_conf->rocksdb_cache_shard_bits); + } else if (cct->_conf->rocksdb_cache_type == "lru") { bbt_opts.block_cache = rocksdb::NewLRUCache( block_cache_size, - g_conf()->rocksdb_cache_shard_bits); - } else if (g_conf()->rocksdb_cache_type == "clock") { + cct->_conf->rocksdb_cache_shard_bits); + } else if (cct->_conf->rocksdb_cache_type == "clock") { bbt_opts.block_cache = rocksdb::NewClockCache( block_cache_size, - g_conf()->rocksdb_cache_shard_bits); + cct->_conf->rocksdb_cache_shard_bits); if (!bbt_opts.block_cache) { - derr << "rocksdb_cache_type '" << g_conf()->rocksdb_cache_type + derr << "rocksdb_cache_type '" << cct->_conf->rocksdb_cache_type << "' chosen, but RocksDB not compiled with LibTBB. " << dendl; return -EINVAL; } } else { - derr << "unrecognized rocksdb_cache_type '" << g_conf()->rocksdb_cache_type + derr << "unrecognized rocksdb_cache_type '" << cct->_conf->rocksdb_cache_type << "'" << dendl; return -EINVAL; } - bbt_opts.block_size = g_conf()->rocksdb_block_size; + bbt_opts.block_size = cct->_conf->rocksdb_block_size; if (row_cache_size > 0) opt.row_cache = rocksdb::NewLRUCache(row_cache_size, - g_conf()->rocksdb_cache_shard_bits); - uint64_t bloom_bits = g_conf().get_val<uint64_t>("rocksdb_bloom_bits_per_key"); + cct->_conf->rocksdb_cache_shard_bits); + uint64_t bloom_bits = cct->_conf.get_val<uint64_t>("rocksdb_bloom_bits_per_key"); if (bloom_bits > 0) { dout(10) << __func__ << " set bloom filter bits per key to " << bloom_bits << dendl; bbt_opts.filter_policy.reset(rocksdb::NewBloomFilterPolicy(bloom_bits)); } using std::placeholders::_1; - if (g_conf().with_val<std::string>("rocksdb_index_type", + if (cct->_conf.with_val<std::string>("rocksdb_index_type", std::bind(std::equal_to<std::string>(), _1, "binary_search"))) bbt_opts.index_type = rocksdb::BlockBasedTableOptions::IndexType::kBinarySearch; - if (g_conf().with_val<std::string>("rocksdb_index_type", + if (cct->_conf.with_val<std::string>("rocksdb_index_type", std::bind(std::equal_to<std::string>(), _1, "hash_search"))) bbt_opts.index_type = rocksdb::BlockBasedTableOptions::IndexType::kHashSearch; - if (g_conf().with_val<std::string>("rocksdb_index_type", + if (cct->_conf.with_val<std::string>("rocksdb_index_type", std::bind(std::equal_to<std::string>(), _1, "two_level"))) bbt_opts.index_type = rocksdb::BlockBasedTableOptions::IndexType::kTwoLevelIndexSearch; if (!bbt_opts.no_block_cache) { bbt_opts.cache_index_and_filter_blocks = - g_conf().get_val<bool>("rocksdb_cache_index_and_filter_blocks"); + cct->_conf.get_val<bool>("rocksdb_cache_index_and_filter_blocks"); bbt_opts.cache_index_and_filter_blocks_with_high_priority = - g_conf().get_val<bool>("rocksdb_cache_index_and_filter_blocks_with_high_priority"); + cct->_conf.get_val<bool>("rocksdb_cache_index_and_filter_blocks_with_high_priority"); bbt_opts.pin_l0_filter_and_index_blocks_in_cache = - g_conf().get_val<bool>("rocksdb_pin_l0_filter_and_index_blocks_in_cache"); + cct->_conf.get_val<bool>("rocksdb_pin_l0_filter_and_index_blocks_in_cache"); } - bbt_opts.partition_filters = g_conf().get_val<bool>("rocksdb_partition_filters"); - if (g_conf().get_val<Option::size_t>("rocksdb_metadata_block_size") > 0) - bbt_opts.metadata_block_size = g_conf().get_val<Option::size_t>("rocksdb_metadata_block_size"); + bbt_opts.partition_filters = cct->_conf.get_val<bool>("rocksdb_partition_filters"); + if (cct->_conf.get_val<Option::size_t>("rocksdb_metadata_block_size") > 0) + bbt_opts.metadata_block_size = cct->_conf.get_val<Option::size_t>("rocksdb_metadata_block_size"); opt.table_factory.reset(rocksdb::NewBlockBasedTableFactory(bbt_opts)); - dout(10) << __func__ << " block size " << g_conf()->rocksdb_block_size + dout(10) << __func__ << " block size " << cct->_conf->rocksdb_block_size << ", block_cache size " << byte_u_t(block_cache_size) << ", row_cache size " << byte_u_t(row_cache_size) << "; shards " - << (1 << g_conf()->rocksdb_cache_shard_bits) - << ", type " << g_conf()->rocksdb_cache_type + << (1 << cct->_conf->rocksdb_cache_shard_bits) + << ", type " << cct->_conf->rocksdb_cache_type << dendl; opt.merge_operator.reset(new MergeOperatorRouter(*this)); @@ -608,7 +608,7 @@ int RocksDBStore::do_open(ostream &out, } ceph_assert(default_cf != nullptr); - PerfCountersBuilder plb(g_ceph_context, "rocksdb", l_rocksdb_first, l_rocksdb_last); + PerfCountersBuilder plb(cct, "rocksdb", l_rocksdb_first, l_rocksdb_last); plb.add_u64_counter(l_rocksdb_gets, "get", "Gets"); plb.add_u64_counter(l_rocksdb_txns, "submit_transaction", "Submit transactions"); plb.add_u64_counter(l_rocksdb_txns_sync, "submit_transaction_sync", "Submit transactions sync"); @@ -747,13 +747,13 @@ int64_t RocksDBStore::estimate_prefix_size(const string& prefix, void RocksDBStore::get_statistics(Formatter *f) { - if (!g_conf()->rocksdb_perf) { + if (!cct->_conf->rocksdb_perf) { dout(20) << __func__ << " RocksDB perf is disabled, can't probe for stats" << dendl; return; } - if (g_conf()->rocksdb_collect_compaction_stats) { + if (cct->_conf->rocksdb_collect_compaction_stats) { std::string stat_str; bool status = db->GetProperty("rocksdb.stats", &stat_str); if (status) { @@ -767,7 +767,7 @@ void RocksDBStore::get_statistics(Formatter *f) f->close_section(); } } - if (g_conf()->rocksdb_collect_extended_stats) { + if (cct->_conf->rocksdb_collect_extended_stats) { if (dbstats) { f->open_object_section("rocksdb_extended_statistics"); string stat_str = dbstats->ToString(); @@ -783,7 +783,7 @@ void RocksDBStore::get_statistics(Formatter *f) logger->dump_formatted(f,0); f->close_section(); } - if (g_conf()->rocksdb_collect_memory_stats) { + if (cct->_conf->rocksdb_collect_memory_stats) { f->open_object_section("rocksdb_memtable_statistics"); std::string str; if (!bbt_opts.no_block_cache) { @@ -807,7 +807,7 @@ int RocksDBStore::submit_common(rocksdb::WriteOptions& woptions, KeyValueDB::Tra { // enable rocksdb breakdown // considering performance overhead, default is disabled - if (g_conf()->rocksdb_perf) { + if (cct->_conf->rocksdb_perf) { rocksdb::SetPerfLevel(rocksdb::PerfLevel::kEnableTimeExceptForMutex); rocksdb::get_perf_context()->Reset(); } @@ -828,7 +828,7 @@ int RocksDBStore::submit_common(rocksdb::WriteOptions& woptions, KeyValueDB::Tra << " Rocksdb transaction: " << rocks_txc.seen << dendl; } - if (g_conf()->rocksdb_perf) { + if (cct->_conf->rocksdb_perf) { utime_t write_memtable_time; utime_t write_delay_time; utime_t write_wal_time; diff --git a/src/librbd/BlockGuard.h b/src/librbd/BlockGuard.h index 1b59ab78875..4a9cac04523 100644 --- a/src/librbd/BlockGuard.h +++ b/src/librbd/BlockGuard.h @@ -21,6 +21,7 @@ namespace librbd { struct BlockExtent { + // [block_start, block_end) uint64_t block_start = 0; uint64_t block_end = 0; @@ -55,7 +56,7 @@ public: BlockGuard &operator=(const BlockGuard&) = delete; /** - * Detain future IO for a range of blocks. the guard will assume + * Detain future IO for a range of blocks. the guard will keep * ownership of the provided operation if the operation is blocked. * @return 0 upon success and IO can be issued * >0 if the IO is blocked, @@ -64,8 +65,8 @@ public: int detain(const BlockExtent &block_extent, BlockOperation *block_operation, BlockGuardCell **cell) { std::lock_guard locker{m_lock}; - ldout(m_cct, 20) << "block_start=" << block_extent.block_start << ", " - << "block_end=" << block_extent.block_end << ", " + ldout(m_cct, 20) << "[block_start=" << block_extent.block_start << ", " + << "block_end=" << block_extent.block_end << "), " << "free_slots=" << m_free_detained_block_extents.size() << dendl; @@ -109,10 +110,10 @@ public: ceph_assert(cell != nullptr); auto &detained_block_extent = reinterpret_cast<DetainedBlockExtent &>( *cell); - ldout(m_cct, 20) << "block_start=" + ldout(m_cct, 20) << "[block_start=" << detained_block_extent.block_extent.block_start << ", " << "block_end=" - << detained_block_extent.block_extent.block_end << ", " + << detained_block_extent.block_extent.block_end << "), " << "pending_ops=" << (detained_block_extent.block_operations.empty() ? 0 : detained_block_extent.block_operations.size() - 1) diff --git a/src/librbd/api/Mirror.cc b/src/librbd/api/Mirror.cc index 304611dd9e0..99aca1414f9 100644 --- a/src/librbd/api/Mirror.cc +++ b/src/librbd/api/Mirror.cc @@ -1861,7 +1861,7 @@ int Mirror<I>::image_status_summary(librados::IoCtx& io_ctx, return r; } - std::map<cls::rbd::MirrorImageStatusState, int> states_; + std::map<cls::rbd::MirrorImageStatusState, int32_t> states_; r = cls_client::mirror_image_status_get_summary(&io_ctx, mirror_peers, &states_); if (r < 0 && r != -ENOENT) { diff --git a/src/librbd/cache/rwl/Types.cc b/src/librbd/cache/rwl/Types.cc index 3ad62176f0d..bd1b097c2e7 100644 --- a/src/librbd/cache/rwl/Types.cc +++ b/src/librbd/cache/rwl/Types.cc @@ -38,7 +38,7 @@ void DeferredContexts::add(Context* ctx) { BlockExtent convert_to_block_extent(const uint64_t offset_bytes, const uint64_t length_bytes) { return BlockExtent(offset_bytes, - offset_bytes + length_bytes - 1); + offset_bytes + length_bytes); } BlockExtent WriteLogPmemEntry::block_extent() { diff --git a/src/librbd/cache/rwl/Types.h b/src/librbd/cache/rwl/Types.h index ac300a8b38a..6bfceea0a51 100644 --- a/src/librbd/cache/rwl/Types.h +++ b/src/librbd/cache/rwl/Types.h @@ -234,7 +234,7 @@ struct WriteBufferAllocation { static inline io::Extent image_extent(const BlockExtent& block_extent) { return io::Extent(block_extent.block_start, - block_extent.block_end - block_extent.block_start + 1); + block_extent.block_end - block_extent.block_start); } template <typename ExtentsType> diff --git a/src/mds/CDentry.h b/src/mds/CDentry.h index 353b5e24aef..8bfdf0009b3 100644 --- a/src/mds/CDentry.h +++ b/src/mds/CDentry.h @@ -9,11 +9,9 @@ * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ - - #ifndef CEPH_CDENTRY_H #define CEPH_CDENTRY_H @@ -249,7 +247,7 @@ public: // -- exporting // note: this assumes the dentry already exists. // i.e., the name is already extracted... so we just need the other state. - void encode_export(bufferlist& bl) { + void encode_export(ceph::buffer::list& bl) { ENCODE_START(1, 1, bl); encode(first, bl); encode(state, bl); @@ -272,7 +270,7 @@ public: void abort_export() { put(PIN_TEMPEXPORTING); } - void decode_import(bufferlist::const_iterator& blp, LogSegment *ls) { + void decode_import(ceph::buffer::list::const_iterator& blp, LogSegment *ls) { DECODE_START(1, blp); decode(first, blp); __u32 nstate; @@ -299,8 +297,8 @@ public: return &lock; } void set_object_info(MDSCacheObjectInfo &info) override; - void encode_lock_state(int type, bufferlist& bl) override; - void decode_lock_state(int type, const bufferlist& bl) override; + void encode_lock_state(int type, ceph::buffer::list& bl) override; + void decode_lock_state(int type, const ceph::buffer::list& bl) override; // --------------------------------------------- // replicas (on clients) @@ -330,9 +328,9 @@ public: void remove_client_lease(ClientLease *r, Locker *locker); // returns remaining mask (if any), and kicks locker eval_gathers void remove_client_leases(Locker *locker); - ostream& print_db_line_prefix(ostream& out) override; - void print(ostream& out) override; - void dump(Formatter *f) const; + std::ostream& print_db_line_prefix(std::ostream& out) override; + void print(std::ostream& out) override; + void dump(ceph::Formatter *f) const; __u32 hash; @@ -371,7 +369,7 @@ private: mempool::mds_co::string name; }; -ostream& operator<<(ostream& out, const CDentry& dn); +std::ostream& operator<<(std::ostream& out, const CDentry& dn); #endif diff --git a/src/mds/CDir.h b/src/mds/CDir.h index aa447a88d00..8af22193511 100644 --- a/src/mds/CDir.h +++ b/src/mds/CDir.h @@ -41,7 +41,7 @@ class MDCache; struct ObjectOperation; -ostream& operator<<(ostream& out, const class CDir& dir); +std::ostream& operator<<(std::ostream& out, const class CDir& dir); class CDir : public MDSCacheObject, public Counter<CDir> { public: @@ -428,9 +428,9 @@ public: } } - static void encode_dirstat(bufferlist& bl, const session_info_t& info, const DirStat& ds); + static void encode_dirstat(ceph::buffer::list& bl, const session_info_t& info, const DirStat& ds); - void _encode_base(bufferlist& bl) { + void _encode_base(ceph::buffer::list& bl) { ENCODE_START(1, 1, bl); encode(first, bl); encode(fnode, bl); @@ -438,7 +438,7 @@ public: encode(dir_rep_by, bl); ENCODE_FINISH(bl); } - void _decode_base(bufferlist::const_iterator& p) { + void _decode_base(ceph::buffer::list::const_iterator& p) { DECODE_START(1, p); decode(first, p); decode(fnode, p); @@ -497,12 +497,12 @@ public: void finish_waiting(uint64_t mask, int result = 0); // ditto // -- import/export -- - void encode_export(bufferlist& bl); + void encode_export(ceph::buffer::list& bl); void finish_export(); void abort_export() { put(PIN_TEMPEXPORTING); } - void decode_import(bufferlist::const_iterator& blp, LogSegment *ls); + void decode_import(ceph::buffer::list::const_iterator& blp, LogSegment *ls); void abort_import(); // -- auth pins -- @@ -528,13 +528,13 @@ public: void maybe_finish_freeze(); - pair<bool,bool> is_freezing_or_frozen_tree() const { + std::pair<bool,bool> is_freezing_or_frozen_tree() const { if (freeze_tree_state) { if (freeze_tree_state->frozen) - return make_pair(false, true); - return make_pair(true, false); + return std::make_pair(false, true); + return std::make_pair(true, false); } - return make_pair(false, false); + return std::make_pair(false, false); } bool is_freezing() const override { return is_freezing_dir() || is_freezing_tree(); } @@ -591,10 +591,10 @@ public: } void enable_frozen_inode(); - ostream& print_db_line_prefix(ostream& out) override; - void print(ostream& out) override; - void dump(Formatter *f, int flags = DUMP_DEFAULT) const; - void dump_load(Formatter *f); + std::ostream& print_db_line_prefix(std::ostream& out) override; + void print(std::ostream& out) override; + void dump(ceph::Formatter *f, int flags = DUMP_DEFAULT) const; + void dump_load(ceph::Formatter *f); // context MDCache *cache; @@ -635,13 +635,13 @@ protected: void _omap_fetch(MDSContext *fin, const std::set<dentry_key_t>& keys); void _omap_fetch_more( - bufferlist& hdrbl, std::map<std::string, bufferlist>& omap, + ceph::buffer::list& hdrbl, std::map<std::string, ceph::buffer::list>& omap, MDSContext *fin); CDentry *_load_dentry( std::string_view key, std::string_view dname, snapid_t last, - bufferlist &bl, + ceph::buffer::list &bl, int pos, const std::set<snapid_t> *snaps, bool *force_dirty); @@ -661,13 +661,13 @@ protected: */ void go_bad(bool complete); - void _omap_fetched(bufferlist& hdrbl, std::map<std::string, bufferlist>& omap, + void _omap_fetched(ceph::buffer::list& hdrbl, std::map<std::string, ceph::buffer::list>& omap, bool complete, int r); // -- commit -- void _commit(version_t want, int op_prio); void _omap_commit(int op_prio); - void _encode_dentry(CDentry *dn, bufferlist& bl, const std::set<snapid_t> *snaps); + void _encode_dentry(CDentry *dn, ceph::buffer::list& bl, const std::set<snapid_t> *snaps); void _committed(int r, version_t v); version_t projected_version = 0; @@ -730,7 +730,7 @@ protected: mempool::mds_co::compact_map< string_snap_t, MDSContext::vec_alloc<mempool::mds_co::pool_allocator> > waiting_on_dentry; // FIXME string_snap_t not in mempool private: - friend ostream& operator<<(ostream& out, const class CDir& dir); + friend std::ostream& operator<<(std::ostream& out, const class CDir& dir); void log_mark_dirty(); @@ -755,7 +755,7 @@ private: void purge_stale_snap_data(const std::set<snapid_t>& snaps); void prepare_new_fragment(bool replay); - void prepare_old_fragment(map<string_snap_t, MDSContext::vec >& dentry_waiters, bool replay); + void prepare_old_fragment(std::map<string_snap_t, MDSContext::vec >& dentry_waiters, bool replay); void steal_dentry(CDentry *dn); // from another dir. used by merge/split. void finish_old_fragment(MDSContext::vec& waiters, bool replay); void init_fragment_pins(); diff --git a/src/mds/CInode.h b/src/mds/CInode.h index 5f0da6415c7..64295f651fb 100644 --- a/src/mds/CInode.h +++ b/src/mds/CInode.h @@ -81,15 +81,15 @@ public: static object_t get_object_name(inodeno_t ino, frag_t fg, std::string_view suffix); /* Full serialization for use in ".inode" root inode objects */ - void encode(bufferlist &bl, uint64_t features, const bufferlist *snap_blob=NULL) const; - void decode(bufferlist::const_iterator &bl, bufferlist& snap_blob); + void encode(ceph::buffer::list &bl, uint64_t features, const ceph::buffer::list *snap_blob=NULL) const; + void decode(ceph::buffer::list::const_iterator &bl, ceph::buffer::list& snap_blob); /* Serialization without ENCODE_START/FINISH blocks for use embedded in dentry */ - void encode_bare(bufferlist &bl, uint64_t features, const bufferlist *snap_blob=NULL) const; - void decode_bare(bufferlist::const_iterator &bl, bufferlist &snap_blob, __u8 struct_v=5); + void encode_bare(ceph::buffer::list &bl, uint64_t features, const ceph::buffer::list *snap_blob=NULL) const; + void decode_bare(ceph::buffer::list::const_iterator &bl, ceph::buffer::list &snap_blob, __u8 struct_v=5); /* For test/debug output */ - void dump(Formatter *f) const; + void dump(ceph::Formatter *f) const; /* For use by offline tools */ __u32 hash_dentry_name(std::string_view dn); @@ -106,23 +106,23 @@ public: class InodeStore : public InodeStoreBase { public: - void encode(bufferlist &bl, uint64_t features) const { + void encode(ceph::buffer::list &bl, uint64_t features) const { InodeStoreBase::encode(bl, features, &snap_blob); } - void decode(bufferlist::const_iterator &bl) { + void decode(ceph::buffer::list::const_iterator &bl) { InodeStoreBase::decode(bl, snap_blob); } - void encode_bare(bufferlist &bl, uint64_t features) const { + void encode_bare(ceph::buffer::list &bl, uint64_t features) const { InodeStoreBase::encode_bare(bl, features, &snap_blob); } - void decode_bare(bufferlist::const_iterator &bl) { + void decode_bare(ceph::buffer::list::const_iterator &bl) { InodeStoreBase::decode_bare(bl, snap_blob); } static void generate_test_instances(std::list<InodeStore*>& ls); - // FIXME bufferlist not part of mempool - bufferlist snap_blob; // Encoded copy of SnapRealm, because we can't + // FIXME ceph::buffer::list not part of mempool + ceph::buffer::list snap_blob; // Encoded copy of SnapRealm, because we can't // rehydrate it without full MDCache }; WRITE_CLASS_ENCODER_FEATURES(InodeStore) @@ -130,10 +130,10 @@ WRITE_CLASS_ENCODER_FEATURES(InodeStore) // just for ceph-dencoder class InodeStoreBare : public InodeStore { public: - void encode(bufferlist &bl, uint64_t features) const { + void encode(ceph::buffer::list &bl, uint64_t features) const { InodeStore::encode_bare(bl, features); } - void decode(bufferlist::const_iterator &bl) { + void decode(ceph::buffer::list::const_iterator &bl) { InodeStore::decode_bare(bl); } static void generate_test_instances(std::list<InodeStoreBare*>& ls); @@ -178,7 +178,7 @@ class CInode : public MDSCacheObject, public InodeStoreBase, public Counter<CIno validated_data() {} - void dump(Formatter *f) const; + void dump(ceph::Formatter *f) const; bool all_damage_repaired() const; @@ -197,7 +197,7 @@ class CInode : public MDSCacheObject, public InodeStoreBase, public Counter<CIno friend class MDCache; friend class StrayManager; friend class CDir; - friend ostream& operator<<(ostream&, const CInode&); + friend std::ostream& operator<<(std::ostream&, const CInode&); class scrub_stamp_info_t { public: @@ -354,7 +354,7 @@ class CInode : public MDSCacheObject, public InodeStoreBase, public Counter<CIno std::string_view pin_name(int p) const override; - ostream& print_db_line_prefix(ostream& out) override; + std::ostream& print_db_line_prefix(std::ostream& out) override; const scrub_info_t *scrub_info() const{ if (!scrub_infop) @@ -565,11 +565,11 @@ class CInode : public MDSCacheObject, public InodeStoreBase, public Counter<CIno void verify_dirfrags(); void get_stickydirs(); - void put_stickydirs(); + void put_stickydirs(); void add_need_snapflush(CInode *snapin, snapid_t snapid, client_t client); void remove_need_snapflush(CInode *snapin, snapid_t snapid, client_t client); - pair<bool,bool> split_need_snapflush(CInode *cowin, CInode *in); + std::pair<bool,bool> split_need_snapflush(CInode *cowin, CInode *in); // -- accessors -- bool is_root() const { return inode.ino == MDS_INO_ROOT; } @@ -648,23 +648,23 @@ class CInode : public MDSCacheObject, public InodeStoreBase, public Counter<CIno */ void flush(MDSContext *fin); void fetch(MDSContext *fin); - void _fetched(bufferlist& bl, bufferlist& bl2, Context *fin); + void _fetched(ceph::buffer::list& bl, ceph::buffer::list& bl2, Context *fin); void build_backtrace(int64_t pool, inode_backtrace_t& bt); void store_backtrace(MDSContext *fin, int op_prio=-1); void _stored_backtrace(int r, version_t v, Context *fin); - void fetch_backtrace(Context *fin, bufferlist *backtrace); + void fetch_backtrace(Context *fin, ceph::buffer::list *backtrace); void mark_dirty_parent(LogSegment *ls, bool dirty_pool=false); void clear_dirty_parent(); - void verify_diri_backtrace(bufferlist &bl, int err); + void verify_diri_backtrace(ceph::buffer::list &bl, int err); bool is_dirty_parent() { return state_test(STATE_DIRTYPARENT); } bool is_dirty_pool() { return state_test(STATE_DIRTYPOOL); } - void encode_snap_blob(bufferlist &bl); - void decode_snap_blob(const bufferlist &bl); - void encode_store(bufferlist& bl, uint64_t features); - void decode_store(bufferlist::const_iterator& bl); + void encode_snap_blob(ceph::buffer::list &bl); + void decode_snap_blob(const ceph::buffer::list &bl); + void encode_store(ceph::buffer::list& bl, uint64_t features); + void decode_store(ceph::buffer::list::const_iterator& bl); void add_dir_waiter(frag_t fg, MDSContext *c); void take_dir_waiting(frag_t fg, MDSContext::vec& ls); @@ -675,18 +675,18 @@ class CInode : public MDSCacheObject, public InodeStoreBase, public Counter<CIno void take_waiting(uint64_t tag, MDSContext::vec& ls) override; // -- encode/decode helpers -- - void _encode_base(bufferlist& bl, uint64_t features); - void _decode_base(bufferlist::const_iterator& p); - void _encode_locks_full(bufferlist& bl); - void _decode_locks_full(bufferlist::const_iterator& p); - void _encode_locks_state_for_replica(bufferlist& bl, bool need_recover); - void _encode_locks_state_for_rejoin(bufferlist& bl, int rep); - void _decode_locks_state_for_replica(bufferlist::const_iterator& p, bool is_new); - void _decode_locks_rejoin(bufferlist::const_iterator& p, MDSContext::vec& waiters, + void _encode_base(ceph::buffer::list& bl, uint64_t features); + void _decode_base(ceph::buffer::list::const_iterator& p); + void _encode_locks_full(ceph::buffer::list& bl); + void _decode_locks_full(ceph::buffer::list::const_iterator& p); + void _encode_locks_state_for_replica(ceph::buffer::list& bl, bool need_recover); + void _encode_locks_state_for_rejoin(ceph::buffer::list& bl, int rep); + void _decode_locks_state_for_replica(ceph::buffer::list::const_iterator& p, bool is_new); + void _decode_locks_rejoin(ceph::buffer::list::const_iterator& p, MDSContext::vec& waiters, std::list<SimpleLock*>& eval_locks, bool survivor); // -- import/export -- - void encode_export(bufferlist& bl); + void encode_export(ceph::buffer::list& bl); void finish_export(); void abort_export() { put(PIN_TEMPEXPORTING); @@ -694,38 +694,38 @@ class CInode : public MDSCacheObject, public InodeStoreBase, public Counter<CIno state_clear(STATE_EXPORTINGCAPS); put(PIN_EXPORTINGCAPS); } - void decode_import(bufferlist::const_iterator& p, LogSegment *ls); + void decode_import(ceph::buffer::list::const_iterator& p, LogSegment *ls); // for giving to clients - int encode_inodestat(bufferlist& bl, Session *session, SnapRealm *realm, + int encode_inodestat(ceph::buffer::list& bl, Session *session, SnapRealm *realm, snapid_t snapid=CEPH_NOSNAP, unsigned max_bytes=0, int getattr_wants=0); - void encode_cap_message(const ref_t<MClientCaps> &m, Capability *cap); + void encode_cap_message(const ceph::ref_t<MClientCaps> &m, Capability *cap); SimpleLock* get_lock(int type) override; void set_object_info(MDSCacheObjectInfo &info) override; - void encode_lock_state(int type, bufferlist& bl) override; - void decode_lock_state(int type, const bufferlist& bl) override; - void encode_lock_iauth(bufferlist& bl); - void decode_lock_iauth(bufferlist::const_iterator& p); - void encode_lock_ilink(bufferlist& bl); - void decode_lock_ilink(bufferlist::const_iterator& p); - void encode_lock_idft(bufferlist& bl); - void decode_lock_idft(bufferlist::const_iterator& p); - void encode_lock_ifile(bufferlist& bl); - void decode_lock_ifile(bufferlist::const_iterator& p); - void encode_lock_inest(bufferlist& bl); - void decode_lock_inest(bufferlist::const_iterator& p); - void encode_lock_ixattr(bufferlist& bl); - void decode_lock_ixattr(bufferlist::const_iterator& p); - void encode_lock_isnap(bufferlist& bl); - void decode_lock_isnap(bufferlist::const_iterator& p); - void encode_lock_iflock(bufferlist& bl); - void decode_lock_iflock(bufferlist::const_iterator& p); - void encode_lock_ipolicy(bufferlist& bl); - void decode_lock_ipolicy(bufferlist::const_iterator& p); + void encode_lock_state(int type, ceph::buffer::list& bl) override; + void decode_lock_state(int type, const ceph::buffer::list& bl) override; + void encode_lock_iauth(ceph::buffer::list& bl); + void decode_lock_iauth(ceph::buffer::list::const_iterator& p); + void encode_lock_ilink(ceph::buffer::list& bl); + void decode_lock_ilink(ceph::buffer::list::const_iterator& p); + void encode_lock_idft(ceph::buffer::list& bl); + void decode_lock_idft(ceph::buffer::list::const_iterator& p); + void encode_lock_ifile(ceph::buffer::list& bl); + void decode_lock_ifile(ceph::buffer::list::const_iterator& p); + void encode_lock_inest(ceph::buffer::list& bl); + void decode_lock_inest(ceph::buffer::list::const_iterator& p); + void encode_lock_ixattr(ceph::buffer::list& bl); + void decode_lock_ixattr(ceph::buffer::list::const_iterator& p); + void encode_lock_isnap(ceph::buffer::list& bl); + void decode_lock_isnap(ceph::buffer::list::const_iterator& p); + void encode_lock_iflock(ceph::buffer::list& bl); + void decode_lock_iflock(ceph::buffer::list::const_iterator& p); + void encode_lock_ipolicy(ceph::buffer::list& bl); + void decode_lock_ipolicy(ceph::buffer::list::const_iterator& p); void _finish_frag_update(CDir *dir, MutationRef& mut); @@ -743,8 +743,8 @@ class CInode : public MDSCacheObject, public InodeStoreBase, public Counter<CIno void open_snaprealm(bool no_split=false); void close_snaprealm(bool no_join=false); SnapRealm *find_snaprealm() const; - void encode_snap(bufferlist& bl); - void decode_snap(bufferlist::const_iterator& p); + void encode_snap(ceph::buffer::list& bl); + void decode_snap(ceph::buffer::list::const_iterator& p); client_t get_loner() const { return loner_cap; } client_t get_wanted_loner() const { return want_loner_cap; } @@ -904,8 +904,8 @@ class CInode : public MDSCacheObject, public InodeStoreBase, public Counter<CIno mds_rank_t get_export_pin(bool inherit=true) const; bool is_exportable(mds_rank_t dest) const; - void print(ostream& out) override; - void dump(Formatter *f, int flags = DUMP_DEFAULT) const; + void print(std::ostream& out) override; + void dump(ceph::Formatter *f, int flags = DUMP_DEFAULT) const; /** * Validate that the on-disk state of an inode matches what @@ -923,7 +923,7 @@ class CInode : public MDSCacheObject, public InodeStoreBase, public Counter<CIno void validate_disk_state(validated_data *results, MDSContext *fin); static void dump_validation_results(const validated_data& results, - Formatter *f); + ceph::Formatter *f); //bool hack_accessed = false; //utime_t hack_load_stamp; @@ -1013,7 +1013,7 @@ protected: clear_fcntl_lock_state(); clear_flock_lock_state(); } - void _encode_file_locks(bufferlist& bl) const { + void _encode_file_locks(ceph::buffer::list& bl) const { using ceph::encode; bool has_fcntl_locks = fcntl_locks && !fcntl_locks->empty(); encode(has_fcntl_locks, bl); @@ -1024,7 +1024,7 @@ protected: if (has_flock_locks) encode(*flock_locks, bl); } - void _decode_file_locks(bufferlist::const_iterator& p) { + void _decode_file_locks(ceph::buffer::list::const_iterator& p) { using ceph::decode; bool has_fcntl_locks; decode(has_fcntl_locks, p); @@ -1108,8 +1108,8 @@ private: /** @} Scrubbing and fsck */ }; -ostream& operator<<(ostream& out, const CInode& in); -ostream& operator<<(ostream& out, const CInode::scrub_stamp_info_t& si); +std::ostream& operator<<(std::ostream& out, const CInode& in); +std::ostream& operator<<(std::ostream& out, const CInode::scrub_stamp_info_t& si); extern cinode_lock_info_t cinode_lock_info[]; extern int num_cinode_locks; diff --git a/src/mds/Capability.cc b/src/mds/Capability.cc index 32f780ee202..76ae3291d7c 100644 --- a/src/mds/Capability.cc +++ b/src/mds/Capability.cc @@ -23,7 +23,7 @@ * Capability::Export */ -void Capability::Export::encode(bufferlist &bl) const +void Capability::Export::encode(ceph::buffer::list &bl) const { ENCODE_START(3, 2, bl); encode(cap_id, bl); @@ -38,7 +38,7 @@ void Capability::Export::encode(bufferlist &bl) const ENCODE_FINISH(bl); } -void Capability::Export::decode(bufferlist::const_iterator &p) +void Capability::Export::decode(ceph::buffer::list::const_iterator &p) { DECODE_START_LEGACY_COMPAT_LEN(3, 2, 2, p); decode(cap_id, p); @@ -54,7 +54,7 @@ void Capability::Export::decode(bufferlist::const_iterator &p) DECODE_FINISH(p); } -void Capability::Export::dump(Formatter *f) const +void Capability::Export::dump(ceph::Formatter *f) const { f->dump_unsigned("cap_id", cap_id); f->dump_unsigned("wanted", wanted); @@ -78,7 +78,7 @@ void Capability::Export::generate_test_instances(std::list<Capability::Export*>& ls.back()->last_issue_stamp = utime_t(6, 7); } -void Capability::Import::encode(bufferlist &bl) const +void Capability::Import::encode(ceph::buffer::list &bl) const { ENCODE_START(1, 1, bl); encode(cap_id, bl); @@ -87,7 +87,7 @@ void Capability::Import::encode(bufferlist &bl) const ENCODE_FINISH(bl); } -void Capability::Import::decode(bufferlist::const_iterator &bl) +void Capability::Import::decode(ceph::buffer::list::const_iterator &bl) { DECODE_START(1, bl); decode(cap_id, bl); @@ -96,7 +96,7 @@ void Capability::Import::decode(bufferlist::const_iterator &bl) DECODE_FINISH(bl); } -void Capability::Import::dump(Formatter *f) const +void Capability::Import::dump(ceph::Formatter *f) const { f->dump_unsigned("cap_id", cap_id); f->dump_unsigned("issue_seq", issue_seq); @@ -107,7 +107,7 @@ void Capability::Import::dump(Formatter *f) const * Capability::revoke_info */ -void Capability::revoke_info::encode(bufferlist& bl) const +void Capability::revoke_info::encode(ceph::buffer::list& bl) const { ENCODE_START(2, 2, bl) encode(before, bl); @@ -116,7 +116,7 @@ void Capability::revoke_info::encode(bufferlist& bl) const ENCODE_FINISH(bl); } -void Capability::revoke_info::decode(bufferlist::const_iterator& bl) +void Capability::revoke_info::decode(ceph::buffer::list::const_iterator& bl) { DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl); decode(before, bl); @@ -125,7 +125,7 @@ void Capability::revoke_info::decode(bufferlist::const_iterator& bl) DECODE_FINISH(bl); } -void Capability::revoke_info::dump(Formatter *f) const +void Capability::revoke_info::dump(ceph::Formatter *f) const { f->dump_unsigned("before", before); f->dump_unsigned("seq", seq); @@ -227,7 +227,7 @@ void Capability::set_wanted(int w) { _wanted = w; } -void Capability::encode(bufferlist& bl) const +void Capability::encode(ceph::buffer::list& bl) const { ENCODE_START(2, 2, bl) encode(last_sent, bl); @@ -239,7 +239,7 @@ void Capability::encode(bufferlist& bl) const ENCODE_FINISH(bl); } -void Capability::decode(bufferlist::const_iterator &bl) +void Capability::decode(ceph::buffer::list::const_iterator &bl) { DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl) decode(last_sent, bl); @@ -255,7 +255,7 @@ void Capability::decode(bufferlist::const_iterator &bl) calc_issued(); } -void Capability::dump(Formatter *f) const +void Capability::dump(ceph::Formatter *f) const { f->dump_unsigned("last_sent", last_sent); f->dump_unsigned("last_issue_stamp", last_issue_stamp); diff --git a/src/mds/Capability.h b/src/mds/Capability.h index 218eeb40fce..83a1ba5176a 100644 --- a/src/mds/Capability.h +++ b/src/mds/Capability.h @@ -79,9 +79,9 @@ public: ceph_seq_t s, ceph_seq_t m, utime_t lis, unsigned st) : cap_id(id), wanted(w), issued(i), pending(p), client_follows(cf), seq(s), mseq(m), last_issue_stamp(lis), state(st) {} - void encode(bufferlist &bl) const; - void decode(bufferlist::const_iterator &p); - void dump(Formatter *f) const; + void encode(ceph::buffer::list &bl) const; + void decode(ceph::buffer::list::const_iterator &p); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<Export*>& ls); int64_t cap_id = 0; @@ -97,9 +97,9 @@ public: struct Import { Import() {} Import(int64_t i, ceph_seq_t s, ceph_seq_t m) : cap_id(i), issue_seq(s), mseq(m) {} - void encode(bufferlist &bl) const; - void decode(bufferlist::const_iterator &p); - void dump(Formatter *f) const; + void encode(ceph::buffer::list &bl) const; + void decode(ceph::buffer::list::const_iterator &p); + void dump(ceph::Formatter *f) const; int64_t cap_id = 0; ceph_seq_t issue_seq = 0; @@ -108,9 +108,9 @@ public: struct revoke_info { revoke_info() {} revoke_info(__u32 b, ceph_seq_t s, ceph_seq_t li) : before(b), seq(s), last_issue(li) {} - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator& bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator& bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<revoke_info*>& ls); __u32 before = 0; @@ -348,11 +348,11 @@ public: } // serializers - void encode(bufferlist &bl) const; - void decode(bufferlist::const_iterator &bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list &bl) const; + void decode(ceph::buffer::list::const_iterator &bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<Capability*>& ls); - + snapid_t client_follows = 0; version_t client_xattr_version = 0; version_t client_inline_version = 0; diff --git a/src/mds/FSMap.cc b/src/mds/FSMap.cc index b95e5c840c0..9fd18f4e187 100644 --- a/src/mds/FSMap.cc +++ b/src/mds/FSMap.cc @@ -26,8 +26,16 @@ #include "global/global_context.h" #include "mon/health_check.h" +using std::list; +using std::pair; +using std::ostream; +using std::ostringstream; +using std::string; using std::stringstream; +using ceph::bufferlist; +using ceph::Formatter; + void Filesystem::dump(Formatter *f) const { f->open_object_section("mdsmap"); diff --git a/src/mds/FSMap.h b/src/mds/FSMap.h index feed962c818..2a80a9891ac 100644 --- a/src/mds/FSMap.h +++ b/src/mds/FSMap.h @@ -52,10 +52,10 @@ public: return std::make_shared<Filesystem>(std::forward<Args>(args)...); } - void encode(bufferlist& bl, uint64_t features) const; - void decode(bufferlist::const_iterator& p); + void encode(ceph::buffer::list& bl, uint64_t features) const; + void decode(ceph::buffer::list::const_iterator& p); - void dump(Formatter *f) const; + void dump(ceph::Formatter *f) const; void print(std::ostream& out) const; /** @@ -365,8 +365,8 @@ public: const mds_info_t* find_replacement_for(mds_role_t role) const; - void get_health(list<pair<health_status_t,std::string> >& summary, - list<pair<health_status_t,std::string> > *detail) const; + void get_health(std::list<std::pair<health_status_t,std::string> >& summary, + std::list<std::pair<health_status_t,std::string> > *detail) const; void get_health_checks(health_check_map_t *checks) const; @@ -378,18 +378,18 @@ public: */ void sanity() const; - void encode(bufferlist& bl, uint64_t features) const; - void decode(bufferlist::const_iterator& p); - void decode(bufferlist& bl) { + void encode(ceph::buffer::list& bl, uint64_t features) const; + void decode(ceph::buffer::list::const_iterator& p); + void decode(ceph::buffer::list& bl) { auto p = bl.cbegin(); decode(p); } void sanitize(const std::function<bool(int64_t pool)>& pool_exists); - void print(ostream& out) const; - void print_summary(Formatter *f, ostream *out) const; + void print(std::ostream& out) const; + void print_summary(ceph::Formatter *f, std::ostream *out) const; - void dump(Formatter *f) const; + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<FSMap*>& ls); protected: @@ -412,7 +412,7 @@ protected: }; WRITE_CLASS_ENCODER_FEATURES(FSMap) -inline ostream& operator<<(ostream& out, const FSMap& m) { +inline std::ostream& operator<<(std::ostream& out, const FSMap& m) { m.print_summary(NULL, &out); return out; } diff --git a/src/mds/FSMapUser.cc b/src/mds/FSMapUser.cc index 2463019d8d2..63a58acc835 100644 --- a/src/mds/FSMapUser.cc +++ b/src/mds/FSMapUser.cc @@ -1,6 +1,6 @@ #include "FSMapUser.h" -void FSMapUser::encode(bufferlist& bl, uint64_t features) const +void FSMapUser::encode(ceph::buffer::list& bl, uint64_t features) const { ENCODE_START(1, 1, bl); encode(epoch, bl); @@ -12,7 +12,7 @@ void FSMapUser::encode(bufferlist& bl, uint64_t features) const ENCODE_FINISH(bl); } -void FSMapUser::decode(bufferlist::const_iterator& p) +void FSMapUser::decode(ceph::buffer::list::const_iterator& p) { DECODE_START(1, p); decode(epoch, p); @@ -25,7 +25,7 @@ void FSMapUser::decode(bufferlist::const_iterator& p) DECODE_FINISH(p); } -void FSMapUser::fs_info_t::encode(bufferlist& bl, uint64_t features) const +void FSMapUser::fs_info_t::encode(ceph::buffer::list& bl, uint64_t features) const { ENCODE_START(1, 1, bl); encode(cid, bl); @@ -33,7 +33,7 @@ void FSMapUser::fs_info_t::encode(bufferlist& bl, uint64_t features) const ENCODE_FINISH(bl); } -void FSMapUser::fs_info_t::decode(bufferlist::const_iterator& p) +void FSMapUser::fs_info_t::decode(ceph::buffer::list::const_iterator& p) { DECODE_START(1, p); decode(cid, p); @@ -54,7 +54,7 @@ void FSMapUser::generate_test_instances(std::list<FSMapUser*>& ls) } -void FSMapUser::print(ostream& out) const +void FSMapUser::print(std::ostream& out) const { out << "e" << epoch << std::endl; out << "legacy_client_fscid: " << legacy_client_fscid << std::endl; @@ -62,10 +62,10 @@ void FSMapUser::print(ostream& out) const out << " id " << p.second.cid << " name " << p.second.name << std::endl; } -void FSMapUser::print_summary(Formatter *f, ostream *out) +void FSMapUser::print_summary(ceph::Formatter *f, std::ostream *out) { - map<mds_role_t,string> by_rank; - map<string,int> by_state; + std::map<mds_role_t,std::string> by_rank; + std::map<std::string,int> by_state; if (f) { f->dump_unsigned("epoch", get_epoch()); diff --git a/src/mds/FSMapUser.h b/src/mds/FSMapUser.h index 30e5461594d..a0be8e714af 100644 --- a/src/mds/FSMapUser.h +++ b/src/mds/FSMapUser.h @@ -24,8 +24,8 @@ class FSMapUser { public: struct fs_info_t { fs_info_t() {} - void encode(bufferlist& bl, uint64_t features) const; - void decode(bufferlist::const_iterator &bl); + void encode(ceph::buffer::list& bl, uint64_t features) const; + void decode(ceph::buffer::list::const_iterator &bl); std::string name; fs_cluster_id_t cid = FS_CLUSTER_ID_NONE; }; @@ -42,11 +42,11 @@ public: return FS_CLUSTER_ID_NONE; } - void encode(bufferlist& bl, uint64_t features) const; - void decode(bufferlist::const_iterator& bl); + void encode(ceph::buffer::list& bl, uint64_t features) const; + void decode(ceph::buffer::list::const_iterator& bl); - void print(ostream& out) const; - void print_summary(Formatter *f, ostream *out); + void print(std::ostream& out) const; + void print_summary(ceph::Formatter *f, std::ostream *out); static void generate_test_instances(std::list<FSMapUser*>& ls); @@ -57,7 +57,7 @@ public: WRITE_CLASS_ENCODER_FEATURES(FSMapUser::fs_info_t) WRITE_CLASS_ENCODER_FEATURES(FSMapUser) -inline ostream& operator<<(ostream& out, FSMapUser& m) { +inline std::ostream& operator<<(std::ostream& out, FSMapUser& m) { m.print_summary(NULL, &out); return out; } diff --git a/src/mds/LocalLock.h b/src/mds/LocalLock.h index 2381715a755..ed401eaf601 100644 --- a/src/mds/LocalLock.h +++ b/src/mds/LocalLock.h @@ -49,8 +49,8 @@ public: client_t get_last_wrlock_client() const { return last_wrlock_client; } - - void print(ostream& out) const override { + + void print(std::ostream& out) const override { out << "("; _print(out); if (last_wrlock_client >= 0) diff --git a/src/mds/MDSAuthCaps.h b/src/mds/MDSAuthCaps.h index 8c5f2bff77f..940d474a846 100644 --- a/src/mds/MDSAuthCaps.h +++ b/src/mds/MDSAuthCaps.h @@ -111,7 +111,7 @@ struct MDSCapMatch { bool match(std::string_view target_path, const int caller_uid, const int caller_gid, - const vector<uint64_t> *caller_gid_list) const; + const std::vector<uint64_t> *caller_gid_list) const; /** * Check whether this path *might* be accessible (actual permission @@ -168,7 +168,7 @@ public: bool allow_all() const; bool is_capable(std::string_view inode_path, uid_t inode_uid, gid_t inode_gid, unsigned inode_mode, - uid_t uid, gid_t gid, const vector<uint64_t> *caller_gid_list, + uid_t uid, gid_t gid, const std::vector<uint64_t> *caller_gid_list, unsigned mask, uid_t new_uid, gid_t new_gid, const entity_addr_t& addr) const; bool path_capable(std::string_view inode_path) const; diff --git a/src/mds/MDSCacheObject.cc b/src/mds/MDSCacheObject.cc index 74a196d7da3..8398e80c56c 100644 --- a/src/mds/MDSCacheObject.cc +++ b/src/mds/MDSCacheObject.cc @@ -28,7 +28,7 @@ void MDSCacheObject::finish_waiting(uint64_t mask, int result) { finish_contexts(g_ceph_context, finished, result); } -void MDSCacheObject::dump(Formatter *f) const +void MDSCacheObject::dump(ceph::Formatter *f) const { f->dump_bool("is_auth", is_auth()); @@ -74,7 +74,7 @@ void MDSCacheObject::dump(Formatter *f) const * Use this in subclasses when printing their specialized * states too. */ -void MDSCacheObject::dump_states(Formatter *f) const +void MDSCacheObject::dump_states(ceph::Formatter *f) const { if (state_test(STATE_AUTH)) f->dump_string("state", "auth"); if (state_test(STATE_DIRTY)) f->dump_string("state", "dirty"); diff --git a/src/mds/MDSCacheObject.h b/src/mds/MDSCacheObject.h index b71fb94c77a..47f1475de96 100644 --- a/src/mds/MDSCacheObject.h +++ b/src/mds/MDSCacheObject.h @@ -27,6 +27,10 @@ class SimpleLock; class MDSCacheObject; class MDSContext; +namespace ceph { +class Formatter; +} + struct ClientLease { ClientLease(client_t c, MDSCacheObject *p) : client(c), parent(p), @@ -191,8 +195,8 @@ class MDSCacheObject { } #endif - void dump_states(Formatter *f) const; - void dump(Formatter *f) const; + void dump_states(ceph::Formatter *f) const; + void dump(ceph::Formatter *f) const; // auth pins enum { @@ -263,9 +267,9 @@ class MDSCacheObject { seq = ++last_wait_seq; mask &= ~WAIT_ORDERED; } - waiting.insert(pair<uint64_t, pair<uint64_t, MDSContext*> >( + waiting.insert(std::pair<uint64_t, std::pair<uint64_t, MDSContext*> >( mask, - pair<uint64_t, MDSContext*>(seq, c))); + std::pair<uint64_t, MDSContext*>(seq, c))); // pdout(10,g_conf()->debug_mds) << (mdsco_db_line_prefix(this)) // << "add_waiter " << hex << mask << dec << " " << c // << " on " << *this @@ -280,8 +284,8 @@ class MDSCacheObject { // noop unless overloaded. virtual SimpleLock* get_lock(int type) { ceph_abort(); return 0; } virtual void set_object_info(MDSCacheObjectInfo &info) { ceph_abort(); } - virtual void encode_lock_state(int type, bufferlist& bl) { ceph_abort(); } - virtual void decode_lock_state(int type, const bufferlist& bl) { ceph_abort(); } + virtual void encode_lock_state(int type, ceph::buffer::list& bl) { ceph_abort(); } + virtual void decode_lock_state(int type, const ceph::buffer::list& bl) { ceph_abort(); } virtual void finish_lock_waiters(int type, uint64_t mask, int r=0) { ceph_abort(); } virtual void add_lock_waiter(int type, uint64_t mask, MDSContext *c) { ceph_abort(); } virtual bool is_lock_waiting(int type, uint64_t mask) { ceph_abort(); return false; } diff --git a/src/mds/MDSContext.h b/src/mds/MDSContext.h index 78d251ee4b0..6fe507d03f3 100644 --- a/src/mds/MDSContext.h +++ b/src/mds/MDSContext.h @@ -103,7 +103,7 @@ public: void complete(int r) override; - virtual void print(ostream& out) const = 0; + virtual void print(std::ostream& out) const = 0; static bool check_ios_in_flight(ceph::coarse_mono_time cutoff, std::string& slow_count, @@ -130,7 +130,7 @@ public: void complete(int r) final; void set_write_pos(uint64_t wp) { write_pos = wp; } virtual void pre_finish(int r) {} - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "log_event(" << write_pos << ")"; } }; @@ -156,7 +156,7 @@ protected: public: MDSIOContextWrapper(MDSRank *m, Context *c) : MDSHolder(m), fin(c) {} void finish(int r) override; - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "io_context_wrapper(" << fin << ")"; } }; @@ -200,7 +200,7 @@ public: } } void complete(int r) final; - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "io_wrapper(" << wrapped << ")"; } }; diff --git a/src/mds/MDSMap.cc b/src/mds/MDSMap.cc index 1115d2b64e5..6c1a0c2fdb0 100644 --- a/src/mds/MDSMap.cc +++ b/src/mds/MDSMap.cc @@ -12,14 +12,28 @@ * */ +#include <sstream> + #include "common/debug.h" #include "mon/health_check.h" #include "MDSMap.h" -#include <sstream> +using std::dec; +using std::hex; +using std::list; +using std::make_pair; +using std::map; +using std::multimap; +using std::ostream; +using std::pair; +using std::string; +using std::set; using std::stringstream; +using ceph::bufferlist; +using ceph::Formatter; + #define dout_context g_ceph_context #define dout_subsys ceph_subsys_ @@ -440,7 +454,7 @@ void MDSMap::get_health_checks(health_check_map_t *checks) const health_check_t& fscheck = checks->get_or_add( "FS_DEGRADED", HEALTH_WARN, "%num% filesystem%plurals% %isorare% degraded", 1); - ostringstream ss; + std::ostringstream ss; ss << "fs " << fs_name << " is degraded"; fscheck.detail.push_back(ss.str()); diff --git a/src/mds/MDSMap.h b/src/mds/MDSMap.h index 033f25bf348..2c3b3221146 100644 --- a/src/mds/MDSMap.h +++ b/src/mds/MDSMap.h @@ -125,12 +125,12 @@ public: return addrs; } - void encode(bufferlist& bl, uint64_t features) const { + void encode(ceph::buffer::list& bl, uint64_t features) const { if ((features & CEPH_FEATURE_MDSENC) == 0 ) encode_unversioned(bl); else encode_versioned(bl, features); } - void decode(bufferlist::const_iterator& p); - void dump(Formatter *f) const; + void decode(ceph::buffer::list::const_iterator& p); + void dump(ceph::Formatter *f) const; void dump(std::ostream&) const; // The long form name for use in cluster log messages` @@ -154,8 +154,8 @@ public: FROZEN = 1 << 0, }; private: - void encode_versioned(bufferlist& bl, uint64_t features) const; - void encode_unversioned(bufferlist& bl) const; + void encode_versioned(ceph::buffer::list& bl, uint64_t features) const; + void encode_unversioned(ceph::buffer::list& bl) const; }; friend class MDSMonitor; @@ -348,8 +348,8 @@ public: void get_mds_set_lower_bound(std::set<mds_rank_t>& s, DaemonState first) const; void get_mds_set(std::set<mds_rank_t>& s, DaemonState state) const; - void get_health(list<pair<health_status_t,std::string> >& summary, - list<pair<health_status_t,std::string> > *detail) const; + void get_health(std::list<std::pair<health_status_t,std::string> >& summary, + std::list<std::pair<health_status_t,std::string> > *detail) const; void get_health_checks(health_check_map_t *checks) const; @@ -525,18 +525,18 @@ public: return mds_info_entry->second.inc; return -1; } - void encode(bufferlist& bl, uint64_t features) const; - void decode(bufferlist::const_iterator& p); - void decode(const bufferlist& bl) { + void encode(ceph::buffer::list& bl, uint64_t features) const; + void decode(ceph::buffer::list::const_iterator& p); + void decode(const ceph::buffer::list& bl) { auto p = bl.cbegin(); decode(p); } void sanitize(const std::function<bool(int64_t pool)>& pool_exists); - void print(ostream& out) const; - void print_summary(Formatter *f, ostream *out) const; + void print(std::ostream& out) const; + void print_summary(ceph::Formatter *f, std::ostream *out) const; - void dump(Formatter *f) const; + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<MDSMap*>& ls); static bool state_transition_valid(DaemonState prev, DaemonState next); @@ -580,7 +580,7 @@ protected: mds_rank_t max_mds = 1; /* The maximum number of active MDSes. Also, the maximum rank. */ mds_rank_t old_max_mds = 0; /* Value to restore when MDS cluster is marked up */ mds_rank_t standby_count_wanted = -1; - string balancer; /* The name/version of the mantle balancer (i.e. the rados obj name) */ + std::string balancer; /* The name/version of the mantle balancer (i.e. the rados obj name) */ std::set<mds_rank_t> in; // currently defined cluster @@ -600,7 +600,7 @@ protected: WRITE_CLASS_ENCODER_FEATURES(MDSMap::mds_info_t) WRITE_CLASS_ENCODER_FEATURES(MDSMap) -inline ostream& operator<<(ostream &out, const MDSMap &m) { +inline std::ostream& operator<<(std::ostream &out, const MDSMap &m) { m.print_summary(NULL, &out); return out; } diff --git a/src/mds/Mutation.h b/src/mds/Mutation.h index d79b430de66..389c7a09c99 100644 --- a/src/mds/Mutation.h +++ b/src/mds/Mutation.h @@ -80,7 +80,7 @@ public: mutable mds_rank_t wrlock_target; }; - struct LockOpVec : public vector<LockOp> { + struct LockOpVec : public std::vector<LockOp> { LockOpVec() { reserve(32); } @@ -111,7 +111,7 @@ public: void sort_and_merge(); }; - using lock_set = set<LockOp>; + using lock_set = std::set<LockOp>; using lock_iterator = lock_set::iterator; // keep our default values synced with MDRequestParam's @@ -210,12 +210,12 @@ public: void apply(); void cleanup(); - virtual void print(ostream &out) const { + virtual void print(std::ostream &out) const { out << "mutation(" << this << ")"; } - virtual void dump(Formatter *f) const {} - void _dump_op_descriptor_unlocked(ostream& stream) const override; + virtual void dump(ceph::Formatter *f) const {} + void _dump_op_descriptor_unlocked(std::ostream& stream) const override; metareqid_t reqid; __u32 attempt = 0; // which attempt for this request @@ -255,12 +255,12 @@ public: bool killed = false; // for applying projected inode changes - list<CInode*> projected_inodes; + std::list<CInode*> projected_inodes; std::vector<CDir*> projected_fnodes; - list<ScatterLock*> updated_locks; + std::list<ScatterLock*> updated_locks; - list<CInode*> dirty_cow_inodes; - list<pair<CDentry*,version_t> > dirty_cow_dentries; + std::list<CInode*> dirty_cow_inodes; + std::list<std::pair<CDentry*,version_t> > dirty_cow_dentries; private: utime_t mds_stamp; ///< mds-local timestamp (real time) @@ -282,21 +282,21 @@ struct MDRequestImpl : public MutationImpl { More() {} int slave_error = 0; - set<mds_rank_t> slaves; // mds nodes that have slave requests to me (implies client_request) - set<mds_rank_t> waiting_on_slave; // peers i'm waiting for slavereq replies from. + std::set<mds_rank_t> slaves; // mds nodes that have slave requests to me (implies client_request) + std::set<mds_rank_t> waiting_on_slave; // peers i'm waiting for slavereq replies from. // for rename/link/unlink - set<mds_rank_t> witnessed; // nodes who have journaled a RenamePrepare - map<MDSCacheObject*,version_t> pvmap; + std::set<mds_rank_t> witnessed; // nodes who have journaled a RenamePrepare + std::map<MDSCacheObject*,version_t> pvmap; bool has_journaled_slaves = false; bool slave_update_journaled = false; bool slave_rolling_back = false; // for rename - set<mds_rank_t> extra_witnesses; // replica list from srcdn auth (rename) + std::set<mds_rank_t> extra_witnesses; // replica list from srcdn auth (rename) mds_rank_t srcdn_auth_mds = MDS_RANK_NONE; - bufferlist inode_import; + ceph::buffer::list inode_import; version_t inode_import_v = 0; CInode* rename_inode = nullptr; bool is_freeze_authpin = false; @@ -304,22 +304,22 @@ struct MDRequestImpl : public MutationImpl { bool is_remote_frozen_authpin = false; bool is_inode_exporter = false; - map<client_t, pair<Session*, uint64_t> > imported_session_map; - map<CInode*, map<client_t,Capability::Export> > cap_imports; + std::map<client_t, std::pair<Session*, uint64_t> > imported_session_map; + std::map<CInode*, std::map<client_t,Capability::Export> > cap_imports; // for lock/flock bool flock_was_waiting = false; // for snaps version_t stid = 0; - bufferlist snapidbl; + ceph::buffer::list snapidbl; sr_t *srci_srnode = nullptr; sr_t *desti_srnode = nullptr; // called when slave commits or aborts Context *slave_commit = nullptr; - bufferlist rollback_bl; + ceph::buffer::list rollback_bl; MDSContext::vec waiting_for_finish; @@ -350,8 +350,8 @@ struct MDRequestImpl : public MutationImpl { } metareqid_t reqid; __u32 attempt = 0; - cref_t<MClientRequest> client_req; - cref_t<Message> triggering_slave_req; + ceph::cref_t<MClientRequest> client_req; + ceph::cref_t<Message> triggering_slave_req; mds_rank_t slave_to = MDS_RANK_NONE; utime_t initiated; utime_t throttled, all_read, dispatched; @@ -384,24 +384,24 @@ struct MDRequestImpl : public MutationImpl { bool is_batch_op(); int compare_paths(); - void print(ostream &out) const override; - void dump(Formatter *f) const override; + void print(std::ostream &out) const override; + void dump(ceph::Formatter *f) const override; - cref_t<MClientRequest> release_client_request(); - void reset_slave_request(const cref_t<MMDSSlaveRequest>& req=nullptr); + ceph::cref_t<MClientRequest> release_client_request(); + void reset_slave_request(const ceph::cref_t<MMDSSlaveRequest>& req=nullptr); Session *session = nullptr; elist<MDRequestImpl*>::item item_session_request; // if not on list, op is aborted. // -- i am a client (master) request - cref_t<MClientRequest> client_request; // client request (if any) + ceph::cref_t<MClientRequest> client_request; // client request (if any) // tree and depth info of path1 and path2 inodeno_t dir_root[2] = {0, 0}; int dir_depth[2] = {-1, -1}; file_layout_t dir_layout; // store up to two sets of dn vectors, inode pointers, for request path1 and path2. - vector<CDentry*> dn[2]; + std::vector<CDentry*> dn[2]; CInode *in[2] = {}; CDentry *straydn = nullptr; snapid_t snapid = CEPH_NOSNAP; @@ -419,13 +419,13 @@ struct MDRequestImpl : public MutationImpl { bool o_trunc = false; ///< request is an O_TRUNC mutation bool has_completed = false; ///< request has already completed - bufferlist reply_extra_bl; + ceph::buffer::list reply_extra_bl; // inos we did a embedded cap release on, and may need to eval if we haven't since reissued - map<vinodeno_t, ceph_seq_t> cap_releases; + std::map<vinodeno_t, ceph_seq_t> cap_releases; // -- i am a slave request - cref_t<MMDSSlaveRequest> slave_request; // slave request (if one is pending; implies slave == true) + ceph::cref_t<MMDSSlaveRequest> slave_request; // slave request (if one is pending; implies slave == true) // -- i am an internal op int internal_op; @@ -442,14 +442,14 @@ struct MDRequestImpl : public MutationImpl { std::vector<Ref> batch_reqs; protected: - void _dump(Formatter *f) const override; - void _dump_op_descriptor_unlocked(ostream& stream) const override; + void _dump(ceph::Formatter *f) const override; + void _dump_op_descriptor_unlocked(std::ostream& stream) const override; private: mutable ceph::spinlock msg_lock; }; struct MDSlaveUpdate { - MDSlaveUpdate(int oo, bufferlist &rbl, elist<MDSlaveUpdate*> &list) : + MDSlaveUpdate(int oo, ceph::buffer::list &rbl, elist<MDSlaveUpdate*> &list) : origop(oo), item(this) { rollback.claim(rbl); @@ -461,11 +461,11 @@ struct MDSlaveUpdate { waiter->complete(0); } int origop; - bufferlist rollback; + ceph::buffer::list rollback; elist<MDSlaveUpdate*>::item item; Context *waiter = nullptr; - set<CInode*> olddirs; - set<CInode*> unlinked; + std::set<CInode*> olddirs; + std::set<CInode*> unlinked; }; struct MDLockCacheItem { @@ -519,7 +519,7 @@ struct MDLockCache : public MutationImpl { typedef boost::intrusive_ptr<MutationImpl> MutationRef; typedef boost::intrusive_ptr<MDRequestImpl> MDRequestRef; -inline ostream& operator<<(ostream &out, const MutationImpl &mut) +inline std::ostream& operator<<(std::ostream &out, const MutationImpl &mut) { mut.print(out); return out; diff --git a/src/mds/ScatterLock.h b/src/mds/ScatterLock.h index 27f9ba47bab..f654fd2ff31 100644 --- a/src/mds/ScatterLock.h +++ b/src/mds/ScatterLock.h @@ -142,7 +142,7 @@ public: state = LOCK_LOCK; } - void encode_state_for_rejoin(bufferlist& bl, int rep) { + void encode_state_for_rejoin(ceph::buffer::list& bl, int rep) { __s16 s = get_replica_state(); if (is_gathering(rep)) { // the recovering mds may hold rejoined wrlocks @@ -171,7 +171,7 @@ public: encode(s, bl); } - void decode_state_rejoin(bufferlist::const_iterator& p, MDSContext::vec& waiters, bool survivor) { + void decode_state_rejoin(ceph::buffer::list::const_iterator& p, MDSContext::vec& waiters, bool survivor) { SimpleLock::decode_state_rejoin(p, waiters, survivor); if (is_flushing()) { set_dirty(); @@ -190,7 +190,7 @@ public: return SimpleLock::remove_replica(from); } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "("; _print(out); if (is_dirty()) diff --git a/src/mds/ScrubHeader.h b/src/mds/ScrubHeader.h index e69a3727c69..a41471fec21 100644 --- a/src/mds/ScrubHeader.h +++ b/src/mds/ScrubHeader.h @@ -16,8 +16,16 @@ #ifndef SCRUB_HEADER_H_ #define SCRUB_HEADER_H_ +#include <memory> +#include <string> #include <string_view> +#include "include/ceph_assert.h" + +namespace ceph { +class Formatter; +}; + class CInode; /** @@ -27,7 +35,7 @@ class CInode; class ScrubHeader { public: ScrubHeader(std::string_view tag_, bool is_tag_internal_, bool force_, - bool recursive_, bool repair_, Formatter *f_) + bool recursive_, bool repair_, ceph::Formatter *f_) : tag(tag_), is_tag_internal(is_tag_internal_), force(force_), recursive(recursive_), repair(repair_), formatter(f_) { @@ -44,7 +52,7 @@ public: bool is_internal_tag() const { return is_tag_internal; } CInode *get_origin() const { return origin; } std::string_view get_tag() const { return tag; } - Formatter &get_formatter() const { return *formatter; } + ceph::Formatter& get_formatter() const { return *formatter; } bool get_repaired() const { return repaired; } void set_repaired() { repaired = true; } @@ -55,7 +63,7 @@ protected: const bool force; const bool recursive; const bool repair; - Formatter * const formatter; + ceph::Formatter* const formatter; CInode *origin = nullptr; bool repaired = false; // May be set during scrub if repairs happened @@ -65,4 +73,3 @@ typedef std::shared_ptr<ScrubHeader> ScrubHeaderRef; typedef std::shared_ptr<const ScrubHeader> ScrubHeaderRefConst; #endif // SCRUB_HEADER_H_ - diff --git a/src/mds/SessionMap.h b/src/mds/SessionMap.h index 9fec9ded997..9187bdf5d64 100644 --- a/src/mds/SessionMap.h +++ b/src/mds/SessionMap.h @@ -117,7 +117,7 @@ public: } } - void dump(Formatter *f) const; + void dump(ceph::Formatter *f) const; void push_pv(version_t pv) { ceph_assert(projected.empty() || projected.back() != pv); @@ -142,7 +142,7 @@ public: void set_reconnecting(bool s) { reconnecting = s; } - void decode(bufferlist::const_iterator &p); + void decode(ceph::buffer::list::const_iterator &p); template<typename T> void set_client_metadata(T&& meta) { @@ -264,7 +264,7 @@ public: } double get_session_uptime() const { - chrono::duration<double> uptime = clock::now() - birth_time; + std::chrono::duration<double> uptime = clock::now() - birth_time; return uptime.count(); } @@ -331,7 +331,7 @@ public: return erased_any; } bool have_completed_request(ceph_tid_t tid, inodeno_t *pcreated) const { - map<ceph_tid_t,inodeno_t>::const_iterator p = info.completed_requests.find(tid); + auto p = info.completed_requests.find(tid); if (p == info.completed_requests.end()) return false; if (pcreated) @@ -383,7 +383,7 @@ public: } int check_access(CInode *in, unsigned mask, int caller_uid, int caller_gid, - const vector<uint64_t> *gid_list, int new_uid, int new_gid); + const std::vector<uint64_t> *gid_list, int new_uid, int new_gid); void set_connection(ConnectionRef con) { connection = std::move(con); @@ -413,7 +413,7 @@ public: xlist<Session*>::item item_session_list; - list<ref_t<Message>> preopen_out_queue; ///< messages for client, queued before they connect + std::list<ceph::ref_t<Message>> preopen_out_queue; ///< messages for client, queued before they connect /* This is mutable to allow get_request_count to be const. elist does not * support const iterators yet. @@ -477,7 +477,7 @@ private: // -- caps -- uint32_t cap_gen = 0; version_t cap_push_seq = 0; // cap push seq # - map<version_t, MDSContext::vec > waitfor_flush; // flush session messages + std::map<version_t, MDSContext::vec > waitfor_flush; // flush session messages // Has completed_requests been modified since the last time we // wrote this session out? @@ -531,11 +531,11 @@ public: version_t get_version() const {return version;} - virtual void encode_header(bufferlist *header_bl); - virtual void decode_header(bufferlist &header_bl); - virtual void decode_values(std::map<std::string, bufferlist> &session_vals); - virtual void decode_legacy(bufferlist::const_iterator& blp); - void dump(Formatter *f) const; + virtual void encode_header(ceph::buffer::list *header_bl); + virtual void decode_header(ceph::buffer::list &header_bl); + virtual void decode_values(std::map<std::string, ceph::buffer::list> &session_vals); + virtual void decode_legacy(ceph::buffer::list::const_iterator& blp); + void dump(ceph::Formatter *f) const; void set_rank(mds_rank_t r) { @@ -627,7 +627,7 @@ public: } // sessions - void decode_legacy(bufferlist::const_iterator& blp) override; + void decode_legacy(ceph::buffer::list::const_iterator& blp) override; bool empty() const { return session_map.empty(); } const auto& get_sessions() const { return session_map; @@ -723,12 +723,12 @@ public: int header_r, int values_r, bool first, - bufferlist &header_bl, - std::map<std::string, bufferlist> &session_vals, + ceph::buffer::list &header_bl, + std::map<std::string, ceph::buffer::list> &session_vals, bool more_session_vals); void load_legacy(); - void _load_legacy_finish(int r, bufferlist &bl); + void _load_legacy_finish(int r, ceph::buffer::list &bl); void save(MDSContext *onsave, version_t needv=0); void _save_finish(version_t v); @@ -774,8 +774,8 @@ public: * mark these sessions as dirty. */ void replay_open_sessions(version_t event_cmapv, - map<client_t,entity_inst_t>& client_map, - map<client_t,client_metadata_t>& client_metadata_map); + std::map<client_t,entity_inst_t>& client_map, + std::map<client_t,client_metadata_t>& client_metadata_map); /** * For these session IDs, if a session exists with this ID, and it has @@ -790,8 +790,8 @@ public: void handle_conf_change(const std::set <std::string> &changed); MDSRank *mds; - map<int,xlist<Session*>* > by_state; - map<version_t, MDSContext::vec > commit_waiters; + std::map<int,xlist<Session*>*> by_state; + std::map<version_t, MDSContext::vec> commit_waiters; // -- loading, saving -- inodeno_t ino; diff --git a/src/mds/SimpleLock.cc b/src/mds/SimpleLock.cc index 1f3b732169b..4e1ad647c06 100644 --- a/src/mds/SimpleLock.cc +++ b/src/mds/SimpleLock.cc @@ -16,7 +16,7 @@ #include "SimpleLock.h" #include "Mutation.h" -void SimpleLock::dump(Formatter *f) const { +void SimpleLock::dump(ceph::Formatter *f) const { ceph_assert(f != NULL); if (is_sync_and_unlocked()) { return; diff --git a/src/mds/SimpleLock.h b/src/mds/SimpleLock.h index 1ad4cd91300..74c8e84c267 100644 --- a/src/mds/SimpleLock.h +++ b/src/mds/SimpleLock.h @@ -204,10 +204,10 @@ public: int get_cap_shift() const; int get_cap_mask() const; - void decode_locked_state(const bufferlist& bl) { + void decode_locked_state(const ceph::buffer::list& bl) { parent->decode_lock_state(type->type, bl); } - void encode_locked_state(bufferlist& bl) { + void encode_locked_state(ceph::buffer::list& bl) { parent->encode_lock_state(type->type, bl); } void finish_waiters(uint64_t mask, int r=0) { @@ -283,10 +283,10 @@ public: } // gather set - static set<int32_t> empty_gather_set; + static std::set<int32_t> empty_gather_set; // int32_t: <0 is client, >=0 is MDS rank - const set<int32_t>& get_gather_set() const { + const std::set<int32_t>& get_gather_set() const { return have_more() ? more()->gather_set : empty_gather_set; } @@ -465,7 +465,7 @@ public: } // encode/decode - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { ENCODE_START(2, 2, bl); encode(state, bl); if (have_more()) @@ -474,28 +474,28 @@ public: encode(empty_gather_set, bl); ENCODE_FINISH(bl); } - void decode(bufferlist::const_iterator& p) { + void decode(ceph::buffer::list::const_iterator& p) { DECODE_START(2, p); decode(state, p); - set<__s32> g; + std::set<__s32> g; decode(g, p); if (!g.empty()) more()->gather_set.swap(g); DECODE_FINISH(p); } - void encode_state_for_replica(bufferlist& bl) const { + void encode_state_for_replica(ceph::buffer::list& bl) const { __s16 s = get_replica_state(); using ceph::encode; encode(s, bl); } - void decode_state(bufferlist::const_iterator& p, bool is_new=true) { + void decode_state(ceph::buffer::list::const_iterator& p, bool is_new=true) { using ceph::decode; __s16 s; decode(s, p); if (is_new) state = s; } - void decode_state_rejoin(bufferlist::const_iterator& p, MDSContext::vec& waiters, bool survivor) { + void decode_state_rejoin(ceph::buffer::list::const_iterator& p, MDSContext::vec& waiters, bool survivor) { __s16 s; using ceph::decode; decode(s, p); @@ -562,7 +562,7 @@ public: return false; } - void _print(ostream& out) const { + void _print(std::ostream& out) const { out << get_lock_type_name(get_type()) << " "; out << get_state_name(get_state()); if (!get_gather_set().empty()) @@ -589,9 +589,9 @@ public: * Write bare values (caller must be in an object section) * to formatter, or nothing if is_sync_and_unlocked. */ - void dump(Formatter *f) const; + void dump(ceph::Formatter *f) const; - virtual void print(ostream& out) const { + virtual void print(std::ostream& out) const { out << "("; _print(out); out << ")"; @@ -629,7 +629,7 @@ private: lock_caches.empty(); } - set<__s32> gather_set; // auth+rep. >= 0 is mds, < 0 is client + std::set<__s32> gather_set; // auth+rep. >= 0 is mds, < 0 is client // local state int num_wrlock = 0, num_xlock = 0; @@ -658,7 +658,7 @@ private: }; WRITE_CLASS_ENCODER(SimpleLock) -inline ostream& operator<<(ostream& out, const SimpleLock& l) +inline std::ostream& operator<<(std::ostream& out, const SimpleLock& l) { l.print(out); return out; diff --git a/src/mds/SnapRealm.h b/src/mds/SnapRealm.h index 6e62e3898bc..805b16bf3f7 100644 --- a/src/mds/SnapRealm.h +++ b/src/mds/SnapRealm.h @@ -29,9 +29,7 @@ public: SnapRealm(MDCache *c, CInode *in); bool exists(std::string_view name) const { - for (map<snapid_t,SnapInfo>::const_iterator p = srnode.snaps.begin(); - p != srnode.snaps.end(); - ++p) { + for (auto p = srnode.snaps.begin(); p != srnode.snaps.end(); ++p) { if (p->second.name == name) return true; } @@ -53,15 +51,15 @@ public: } void build_snap_set() const; - void get_snap_info(map<snapid_t, const SnapInfo*>& infomap, snapid_t first=0, snapid_t last=CEPH_NOSNAP); + void get_snap_info(std::map<snapid_t, const SnapInfo*>& infomap, snapid_t first=0, snapid_t last=CEPH_NOSNAP); - const bufferlist& get_snap_trace() const; + const ceph::buffer::list& get_snap_trace() const; void build_snap_trace() const; std::string_view get_snapname(snapid_t snapid, inodeno_t atino); snapid_t resolve_snapname(std::string_view name, inodeno_t atino, snapid_t first=0, snapid_t last=CEPH_NOSNAP); - const set<snapid_t>& get_snaps() const; + const std::set<snapid_t>& get_snaps() const; const SnapContext& get_snap_context() const; void invalidate_cached_snaps() { cached_seq = 0; @@ -88,8 +86,8 @@ public: snapid_t get_snap_following(snapid_t follows) { check_cache(); - const set<snapid_t>& s = get_snaps(); - set<snapid_t>::const_iterator p = s.upper_bound(follows); + const std::set<snapid_t>& s = get_snaps(); + auto p = s.upper_bound(follows); if (p != s.end()) return *p; return CEPH_NOSNAP; @@ -97,8 +95,8 @@ public: bool has_snaps_in_range(snapid_t first, snapid_t last) { check_cache(); - const set<snapid_t>& s = get_snaps(); - set<snapid_t>::const_iterator p = s.lower_bound(first); + const auto& s = get_snaps(); + auto p = s.lower_bound(first); return (p != s.end() && *p <= last); } @@ -133,11 +131,11 @@ public: bool past_parents_dirty = false; SnapRealm *parent = nullptr; - set<SnapRealm*> open_children; // active children that are currently open - set<SnapRealm*> open_past_children; // past children who has pinned me + std::set<SnapRealm*> open_children; // active children that are currently open + std::set<SnapRealm*> open_past_children; // past children who has pinned me elist<CInode*> inodes_with_caps = 0; // for efficient realm splits - map<client_t, xlist<Capability*>* > client_caps; // to identify clients who need snap notifications + std::map<client_t, xlist<Capability*>* > client_caps; // to identify clients who need snap notifications protected: void check_cache() const; @@ -146,17 +144,17 @@ private: mutable bool open = false; // set to true once all past_parents are opened bool global; - map<inodeno_t, pair<SnapRealm*, set<snapid_t> > > open_past_parents; // these are explicitly pinned. + std::map<inodeno_t, std::pair<SnapRealm*, std::set<snapid_t>>> open_past_parents; // these are explicitly pinned. unsigned num_open_past_parents = 0; // cache mutable snapid_t cached_seq; // max seq over self and all past+present parents. mutable snapid_t cached_last_created; // max last_created over all past+present parents mutable snapid_t cached_last_destroyed; - mutable set<snapid_t> cached_snaps; + mutable std::set<snapid_t> cached_snaps; mutable SnapContext cached_snap_context; - mutable bufferlist cached_snap_trace; + mutable ceph::buffer::list cached_snap_trace; }; -ostream& operator<<(ostream& out, const SnapRealm &realm); +std::ostream& operator<<(std::ostream& out, const SnapRealm &realm); #endif diff --git a/src/mds/flock.cc b/src/mds/flock.cc index 2382322bce4..69d579d3034 100644 --- a/src/mds/flock.cc +++ b/src/mds/flock.cc @@ -8,6 +8,10 @@ #define dout_subsys ceph_subsys_mds +using std::list; +using std::pair; +using std::multimap; + static multimap<ceph_filelock, ceph_lock_state_t*> global_waiting_locks; static void remove_global_waiting(ceph_filelock &fl, ceph_lock_state_t *lock_state) @@ -35,7 +39,7 @@ ceph_lock_state_t::~ceph_lock_state_t() bool ceph_lock_state_t::is_waiting(const ceph_filelock &fl) const { - multimap<uint64_t, ceph_filelock>::const_iterator p = waiting_locks.find(fl.start); + auto p = waiting_locks.find(fl.start); while (p != waiting_locks.end()) { if (p->second.start > fl.start) return false; @@ -81,7 +85,7 @@ bool ceph_lock_state_t::is_deadlock(const ceph_filelock& fl, return false; // find conflict locks' owners - set<ceph_filelock> lock_owners; + std::set<ceph_filelock> lock_owners; for (auto p = overlapping_locks.begin(); p != overlapping_locks.end(); ++p) { diff --git a/src/mds/flock.h b/src/mds/flock.h index 7166f8783da..915d912e1ee 100644 --- a/src/mds/flock.h +++ b/src/mds/flock.h @@ -8,7 +8,7 @@ #include "common/debug.h" #include "mdstypes.h" -inline ostream& operator<<(ostream& out, const ceph_filelock& l) { +inline std::ostream& operator<<(std::ostream& out, const ceph_filelock& l) { out << "start: " << l.start << ", length: " << l.length << ", client: " << l.client << ", owner: " << l.owner << ", pid: " << l.pid << ", type: " << (int)l.type @@ -118,16 +118,16 @@ public: * @param activated_locks A return parameter, holding activated wait locks. */ void remove_lock(const ceph_filelock removal_lock, - list<ceph_filelock>& activated_locks); + std::list<ceph_filelock>& activated_locks); bool remove_all_from(client_t client); - void encode(bufferlist& bl) const { + void encode(ceph::bufferlist& bl) const { using ceph::encode; encode(held_locks, bl); encode(client_held_lock_counts, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::bufferlist::const_iterator& bl) { using ceph::decode; decode(held_locks, bl); decode(client_held_lock_counts, bl); @@ -138,11 +138,11 @@ public: client_waiting_lock_counts.empty(); } - multimap<uint64_t, ceph_filelock> held_locks; // current locks - multimap<uint64_t, ceph_filelock> waiting_locks; // locks waiting for other locks + std::multimap<uint64_t, ceph_filelock> held_locks; // current locks + std::multimap<uint64_t, ceph_filelock> waiting_locks; // locks waiting for other locks // both of the above are keyed by starting offset - map<client_t, int> client_held_lock_counts; - map<client_t, int> client_waiting_lock_counts; + std::map<client_t, int> client_held_lock_counts; + std::map<client_t, int> client_waiting_lock_counts; private: static const unsigned MAX_DEADLK_DEPTH = 5; @@ -156,8 +156,8 @@ private: * @depth recursion call depth */ bool is_deadlock(const ceph_filelock& fl, - list<multimap<uint64_t, ceph_filelock>::iterator>& - overlapping_locks, + std::list<std::multimap<uint64_t, ceph_filelock>::iterator>& + overlapping_locks, const ceph_filelock *first_fl=NULL, unsigned depth=0) const; /** @@ -186,19 +186,19 @@ private: * @param neighbor_locks locks owned by same process that neighbor new_lock on * left or right side. */ - void adjust_locks(list<multimap<uint64_t, ceph_filelock>::iterator> old_locks, + void adjust_locks(std::list<std::multimap<uint64_t, ceph_filelock>::iterator> old_locks, ceph_filelock& new_lock, - list<multimap<uint64_t, ceph_filelock>::iterator> + std::list<std::multimap<uint64_t, ceph_filelock>::iterator> neighbor_locks); //get last lock prior to start position - multimap<uint64_t, ceph_filelock>::iterator + std::multimap<uint64_t, ceph_filelock>::iterator get_lower_bound(uint64_t start, - multimap<uint64_t, ceph_filelock>& lock_map); + std::multimap<uint64_t, ceph_filelock>& lock_map); //get latest-starting lock that goes over the byte "end" - multimap<uint64_t, ceph_filelock>::iterator + std::multimap<uint64_t, ceph_filelock>::iterator get_last_before(uint64_t end, - multimap<uint64_t, ceph_filelock>& lock_map); + std::multimap<uint64_t, ceph_filelock>& lock_map); /* * See if an iterator's lock covers any of the same bounds as a given range @@ -206,10 +206,10 @@ private: * byte is at start + length - 1. * If the length is 0, the lock covers from "start" to the end of the file. */ - bool share_space(multimap<uint64_t, ceph_filelock>::iterator& iter, + bool share_space(std::multimap<uint64_t, ceph_filelock>::iterator& iter, uint64_t start, uint64_t end); - bool share_space(multimap<uint64_t, ceph_filelock>::iterator& iter, + bool share_space(std::multimap<uint64_t, ceph_filelock>::iterator& iter, const ceph_filelock &lock) { uint64_t end = lock.start; if (lock.length) { @@ -226,14 +226,14 @@ private: * Returns: true if at least one lock overlaps. */ bool get_overlapping_locks(const ceph_filelock& lock, - list<multimap<uint64_t, + std::list<std::multimap<uint64_t, ceph_filelock>::iterator> & overlaps, - list<multimap<uint64_t, + std::list<std::multimap<uint64_t, ceph_filelock>::iterator> *self_neighbors); bool get_overlapping_locks(const ceph_filelock& lock, - list<multimap<uint64_t, ceph_filelock>::iterator>& overlaps) { + std::list<std::multimap<uint64_t, ceph_filelock>::iterator>& overlaps) { return get_overlapping_locks(lock, overlaps, NULL); } @@ -244,7 +244,7 @@ private: * Returns: true if at least one waiting_lock overlaps */ bool get_waiting_overlaps(const ceph_filelock& lock, - list<multimap<uint64_t, + std::list<std::multimap<uint64_t, ceph_filelock>::iterator>& overlaps); /* * split a list of locks up by whether they're owned by same @@ -255,12 +255,12 @@ private: * owned_locks: an empty list, to be filled with the locks owned by owner */ void split_by_owner(const ceph_filelock& owner, - list<multimap<uint64_t, + std::list<std::multimap<uint64_t, ceph_filelock>::iterator> & locks, - list<multimap<uint64_t, + std::list<std::multimap<uint64_t, ceph_filelock>::iterator> & owned_locks); - ceph_filelock *contains_exclusive_lock(list<multimap<uint64_t, + ceph_filelock *contains_exclusive_lock(std::list<std::multimap<uint64_t, ceph_filelock>::iterator>& locks); CephContext *cct; @@ -268,7 +268,7 @@ private: }; WRITE_CLASS_ENCODER(ceph_lock_state_t) -inline ostream& operator<<(ostream &out, const ceph_lock_state_t &l) { +inline std::ostream& operator<<(std::ostream &out, const ceph_lock_state_t &l) { out << "ceph_lock_state_t. held_locks.size()=" << l.held_locks.size() << ", waiting_locks.size()=" << l.waiting_locks.size() << ", client_held_lock_counts -- " << l.client_held_lock_counts diff --git a/src/mds/inode_backtrace.cc b/src/mds/inode_backtrace.cc index 8932f62a72b..061aaab8382 100644 --- a/src/mds/inode_backtrace.cc +++ b/src/mds/inode_backtrace.cc @@ -7,7 +7,7 @@ /* inode_backpointer_t */ -void inode_backpointer_t::encode(bufferlist& bl) const +void inode_backpointer_t::encode(ceph::buffer::list& bl) const { ENCODE_START(2, 2, bl); encode(dirino, bl); @@ -16,7 +16,7 @@ void inode_backpointer_t::encode(bufferlist& bl) const ENCODE_FINISH(bl); } -void inode_backpointer_t::decode(bufferlist::const_iterator& bl) +void inode_backpointer_t::decode(ceph::buffer::list::const_iterator& bl) { DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl); decode(dirino, bl); @@ -25,7 +25,7 @@ void inode_backpointer_t::decode(bufferlist::const_iterator& bl) DECODE_FINISH(bl); } -void inode_backpointer_t::decode_old(bufferlist::const_iterator& bl) +void inode_backpointer_t::decode_old(ceph::buffer::list::const_iterator& bl) { using ceph::decode; decode(dirino, bl); @@ -33,7 +33,7 @@ void inode_backpointer_t::decode_old(bufferlist::const_iterator& bl) decode(version, bl); } -void inode_backpointer_t::dump(Formatter *f) const +void inode_backpointer_t::dump(ceph::Formatter *f) const { f->dump_unsigned("dirino", dirino); f->dump_string("dname", dname); @@ -54,7 +54,7 @@ void inode_backpointer_t::generate_test_instances(std::list<inode_backpointer_t* * inode_backtrace_t */ -void inode_backtrace_t::encode(bufferlist& bl) const +void inode_backtrace_t::encode(ceph::buffer::list& bl) const { ENCODE_START(5, 4, bl); encode(ino, bl); @@ -64,7 +64,7 @@ void inode_backtrace_t::encode(bufferlist& bl) const ENCODE_FINISH(bl); } -void inode_backtrace_t::decode(bufferlist::const_iterator& bl) +void inode_backtrace_t::decode(ceph::buffer::list::const_iterator& bl) { DECODE_START_LEGACY_COMPAT_LEN(5, 4, 4, bl); if (struct_v < 3) @@ -87,11 +87,11 @@ void inode_backtrace_t::decode(bufferlist::const_iterator& bl) DECODE_FINISH(bl); } -void inode_backtrace_t::dump(Formatter *f) const +void inode_backtrace_t::dump(ceph::Formatter *f) const { f->dump_unsigned("ino", ino); f->open_array_section("ancestors"); - for (vector<inode_backpointer_t>::const_iterator p = ancestors.begin(); p != ancestors.end(); ++p) { + for (auto p = ancestors.begin(); p != ancestors.end(); ++p) { f->open_object_section("backpointer"); p->dump(f); f->close_section(); @@ -99,7 +99,7 @@ void inode_backtrace_t::dump(Formatter *f) const f->close_section(); f->dump_int("pool", pool); f->open_array_section("old_pools"); - for (set<int64_t>::iterator p = old_pools.begin(); p != old_pools.end(); ++p) { + for (auto p = old_pools.begin(); p != old_pools.end(); ++p) { f->dump_int("old_pool", *p); } f->close_section(); diff --git a/src/mds/inode_backtrace.h b/src/mds/inode_backtrace.h index 919f10b76c0..3674a716bcf 100644 --- a/src/mds/inode_backtrace.h +++ b/src/mds/inode_backtrace.h @@ -25,14 +25,14 @@ struct inode_backpointer_t { inode_backpointer_t() {} inode_backpointer_t(inodeno_t i, std::string_view d, version_t v) : dirino(i), dname(d), version(v) {} - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator &bl); - void decode_old(bufferlist::const_iterator &bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator &bl); + void decode_old(ceph::buffer::list::const_iterator &bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<inode_backpointer_t*>& ls); inodeno_t dirino; // containing directory ino - string dname; // linking dentry name + std::string dname; // linking dentry name version_t version = 0; // child's version at time of backpointer creation }; WRITE_CLASS_ENCODER(inode_backpointer_t) @@ -41,7 +41,7 @@ inline bool operator==(const inode_backpointer_t& l, const inode_backpointer_t& return l.dirino == r.dirino && l.version == r.version && l.dname == r.dname; } -inline ostream& operator<<(ostream& out, const inode_backpointer_t& ib) { +inline std::ostream& operator<<(std::ostream& out, const inode_backpointer_t& ib) { return out << "<" << ib.dirino << "/" << ib.dname << " v" << ib.version << ">"; } @@ -53,9 +53,9 @@ inline ostream& operator<<(ostream& out, const inode_backpointer_t& ib) { struct inode_backtrace_t { inode_backtrace_t() {} - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator &bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator &bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<inode_backtrace_t*>& ls); /** @@ -74,14 +74,14 @@ struct inode_backtrace_t { bool *equivalent, bool *divergent) const; inodeno_t ino; // my ino - vector<inode_backpointer_t> ancestors; + std::vector<inode_backpointer_t> ancestors; int64_t pool = -1; // we use a set for old_pools to avoid duplicate entries, e.g. setlayout 0, 1, 0 - set<int64_t> old_pools; + std::set<int64_t> old_pools; }; WRITE_CLASS_ENCODER(inode_backtrace_t) -inline ostream& operator<<(ostream& out, const inode_backtrace_t& it) { +inline std::ostream& operator<<(std::ostream& out, const inode_backtrace_t& it) { return out << "(" << it.pool << ")" << it.ino << ":" << it.ancestors << "//" << it.old_pools; } diff --git a/src/mds/mdstypes.cc b/src/mds/mdstypes.cc index b7f5d87cfa5..abe459dfb14 100644 --- a/src/mds/mdstypes.cc +++ b/src/mds/mdstypes.cc @@ -8,6 +8,14 @@ const mds_gid_t MDS_GID_NONE = mds_gid_t(0); +using std::list; +using std::make_pair; +using std::ostream; +using std::set; +using std::vector; + +using ceph::bufferlist; +using ceph::Formatter; /* * frag_info_t @@ -237,7 +245,7 @@ void inline_data_t::decode(bufferlist::const_iterator &p) uint32_t inline_len; decode(inline_len, p); if (inline_len > 0) - decode_nohead(inline_len, get_data(), p); + ceph::decode_nohead(inline_len, get_data(), p); else free_data(); } @@ -849,7 +857,7 @@ void cap_reconnect_t::encode_old(bufferlist& bl) const { encode(path, bl); capinfo.flock_len = flockbl.length(); encode(capinfo, bl); - encode_nohead(flockbl, bl); + ceph::encode_nohead(flockbl, bl); } void cap_reconnect_t::decode(bufferlist::const_iterator& bl) { @@ -864,7 +872,7 @@ void cap_reconnect_t::decode_old(bufferlist::const_iterator& bl) { using ceph::decode; decode(path, bl); decode(capinfo, bl); - decode_nohead(capinfo.flock_len, flockbl, bl); + ceph::decode_nohead(capinfo.flock_len, flockbl, bl); } void cap_reconnect_t::dump(Formatter *f) const diff --git a/src/mds/mdstypes.h b/src/mds/mdstypes.h index ddaed5666d6..e2c61bfb233 100644 --- a/src/mds/mdstypes.h +++ b/src/mds/mdstypes.h @@ -109,9 +109,9 @@ inline std::ostream& operator<<(std::ostream& out, const mds_role_t& role) { } // CAPS -inline string gcap_string(int cap) +inline std::string gcap_string(int cap) { - string s; + std::string s; if (cap & CEPH_CAP_GSHARED) s += "s"; if (cap & CEPH_CAP_GEXCL) s += "x"; if (cap & CEPH_CAP_GCACHE) s += "c"; @@ -122,9 +122,9 @@ inline string gcap_string(int cap) if (cap & CEPH_CAP_GLAZYIO) s += "l"; return s; } -inline string ccap_string(int cap) +inline std::string ccap_string(int cap) { - string s; + std::string s; if (cap & CEPH_CAP_PIN) s += "p"; int a = (cap >> CEPH_CAP_SAUTH) & 3; @@ -186,9 +186,9 @@ struct frag_info_t : public scatter_info_t { nsubdirs == o.nsubdirs; } - void encode(bufferlist &bl) const; - void decode(bufferlist::const_iterator& bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list &bl) const; + void decode(ceph::buffer::list::const_iterator& bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<frag_info_t*>& ls); // this frag @@ -246,9 +246,9 @@ struct nest_info_t : public scatter_info_t { rsnaps == o.rsnaps; } - void encode(bufferlist &bl) const; - void decode(bufferlist::const_iterator& bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list &bl) const; + void decode(ceph::buffer::list::const_iterator& bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<nest_info_t*>& ls); // this frag + children @@ -273,12 +273,12 @@ struct vinodeno_t { vinodeno_t() {} vinodeno_t(inodeno_t i, snapid_t s) : ino(i), snapid(s) {} - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; encode(ino, bl); encode(snapid, bl); } - void decode(bufferlist::const_iterator& p) { + void decode(ceph::buffer::list::const_iterator& p) { using ceph::decode; decode(ino, p); decode(snapid, p); @@ -303,20 +303,20 @@ inline bool operator<(const vinodeno_t &l, const vinodeno_t &r) { struct quota_info_t { - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { ENCODE_START(1, 1, bl); encode(max_bytes, bl); encode(max_files, bl); ENCODE_FINISH(bl); } - void decode(bufferlist::const_iterator& p) { + void decode(ceph::buffer::list::const_iterator& p) { DECODE_START_LEGACY_COMPAT_LEN(1, 1, 1, p); decode(max_bytes, p); decode(max_files, p); DECODE_FINISH(p); } - void dump(Formatter *f) const; + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<quota_info_t *>& ls); bool is_valid() const { @@ -335,7 +335,7 @@ inline bool operator==(const quota_info_t &l, const quota_info_t &r) { return memcmp(&l, &r, sizeof(l)) == 0; } -ostream& operator<<(ostream &out, const quota_info_t &n); +std::ostream& operator<<(std::ostream &out, const quota_info_t &n); namespace std { template<> struct hash<vinodeno_t> { @@ -361,16 +361,17 @@ struct client_writeable_range_t { uint64_t first = 0, last = 0; // interval client can write to }; - void encode(bufferlist &bl) const; - void decode(bufferlist::const_iterator& bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list &bl) const; + void decode(ceph::buffer::list::const_iterator& bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<client_writeable_range_t*>& ls); byte_range_t range; snapid_t follows = 0; // aka "data+metadata flushed thru" }; -inline void decode(client_writeable_range_t::byte_range_t& range, bufferlist::const_iterator& bl) { +inline void decode(client_writeable_range_t::byte_range_t& range, ceph::buffer::list::const_iterator& bl) { + using ceph::decode; decode(range.first, bl); decode(range.last, bl); } @@ -404,9 +405,9 @@ public: void free_data() { blp.reset(); } - bufferlist& get_data() { + ceph::buffer::list& get_data() { if (!blp) - blp.reset(new bufferlist); + blp.reset(new ceph::buffer::list); return *blp; } size_t length() const { return blp ? blp->length() : 0; } @@ -414,18 +415,18 @@ public: bool operator==(const inline_data_t& o) const { return length() == o.length() && (length() == 0 || - (*const_cast<bufferlist*>(blp.get()) == *const_cast<bufferlist*>(o.blp.get()))); + (*const_cast<ceph::buffer::list*>(blp.get()) == *const_cast<ceph::buffer::list*>(o.blp.get()))); } bool operator!=(const inline_data_t& o) const { return !(*this == o); } - void encode(bufferlist &bl) const; - void decode(bufferlist::const_iterator& bl); + void encode(ceph::buffer::list &bl) const; + void decode(ceph::buffer::list::const_iterator& bl); version_t version = 1; private: - std::unique_ptr<bufferlist> blp; + std::unique_ptr<ceph::buffer::list> blp; }; WRITE_CLASS_ENCODER(inline_data_t) @@ -524,9 +525,9 @@ struct inode_t { old_pools.insert(l); } - void encode(bufferlist &bl, uint64_t features) const; - void decode(bufferlist::const_iterator& bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list &bl, uint64_t features) const; + void decode(ceph::buffer::list::const_iterator& bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<inode_t*>& ls); /** * Compare this inode_t with another that represent *the same inode* @@ -606,7 +607,7 @@ private: // These methods may be moved back to mdstypes.cc when we have pmr template<template<typename> class Allocator> -void inode_t<Allocator>::encode(bufferlist &bl, uint64_t features) const +void inode_t<Allocator>::encode(ceph::buffer::list &bl, uint64_t features) const { ENCODE_START(15, 6, bl); @@ -664,7 +665,7 @@ void inode_t<Allocator>::encode(bufferlist &bl, uint64_t features) const } template<template<typename> class Allocator> -void inode_t<Allocator>::decode(bufferlist::const_iterator &p) +void inode_t<Allocator>::decode(ceph::buffer::list::const_iterator &p) { DECODE_START_LEGACY_COMPAT_LEN(15, 6, 6, p); @@ -703,10 +704,9 @@ void inode_t<Allocator>::decode(bufferlist::const_iterator &p) if (struct_v >= 3) { decode(client_ranges, p); } else { - map<client_t, client_writeable_range_t::byte_range_t> m; + std::map<client_t, client_writeable_range_t::byte_range_t> m; decode(m, p); - for (map<client_t, client_writeable_range_t::byte_range_t>::iterator - q = m.begin(); q != m.end(); ++q) + for (auto q = m.begin(); q != m.end(); ++q) client_ranges[q->first].range = q->second; } @@ -761,7 +761,7 @@ void inode_t<Allocator>::decode(bufferlist::const_iterator &p) } template<template<typename> class Allocator> -void inode_t<Allocator>::dump(Formatter *f) const +void inode_t<Allocator>::dump(ceph::Formatter *f) const { f->dump_unsigned("ino", ino); f->dump_unsigned("rdev", rdev); @@ -907,14 +907,14 @@ bool inode_t<Allocator>::older_is_consistent(const inode_t<Allocator> &other) co } template<template<typename> class Allocator> -inline void encode(const inode_t<Allocator> &c, ::ceph::bufferlist &bl, uint64_t features) +inline void encode(const inode_t<Allocator> &c, ::ceph::buffer::list &bl, uint64_t features) { ENCODE_DUMP_PRE(); c.encode(bl, features); ENCODE_DUMP_POST(cl); } template<template<typename> class Allocator> -inline void decode(inode_t<Allocator> &c, ::ceph::bufferlist::const_iterator &p) +inline void decode(inode_t<Allocator> &c, ::ceph::buffer::list::const_iterator &p) { c.decode(p); } @@ -923,7 +923,11 @@ template<template<typename> class Allocator> using alloc_string = std::basic_string<char,std::char_traits<char>,Allocator<char>>; template<template<typename> class Allocator> -using xattr_map = compact_map<alloc_string<Allocator>, bufferptr, std::less<alloc_string<Allocator>>, Allocator<std::pair<const alloc_string<Allocator>, bufferptr>>>; // FIXME bufferptr not in mempool +using xattr_map = compact_map<alloc_string<Allocator>, + ceph::bufferptr, + std::less<alloc_string<Allocator>>, + Allocator<std::pair<const alloc_string<Allocator>, + ceph::bufferptr>>>; // FIXME bufferptr not in mempool template<template<typename> class Allocator = std::allocator> struct old_inode_t { @@ -931,15 +935,15 @@ struct old_inode_t { inode_t<Allocator> inode; xattr_map<Allocator> xattrs; - void encode(bufferlist &bl, uint64_t features) const; - void decode(bufferlist::const_iterator& bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list &bl, uint64_t features) const; + void decode(ceph::buffer::list::const_iterator& bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<old_inode_t*>& ls); }; // These methods may be moved back to mdstypes.cc when we have pmr template<template<typename> class Allocator> -void old_inode_t<Allocator>::encode(bufferlist& bl, uint64_t features) const +void old_inode_t<Allocator>::encode(ceph::buffer::list& bl, uint64_t features) const { ENCODE_START(2, 2, bl); encode(first, bl); @@ -949,7 +953,7 @@ void old_inode_t<Allocator>::encode(bufferlist& bl, uint64_t features) const } template<template<typename> class Allocator> -void old_inode_t<Allocator>::decode(bufferlist::const_iterator& bl) +void old_inode_t<Allocator>::decode(ceph::buffer::list::const_iterator& bl) { DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl); decode(first, bl); @@ -959,7 +963,7 @@ void old_inode_t<Allocator>::decode(bufferlist::const_iterator& bl) } template<template<typename> class Allocator> -void old_inode_t<Allocator>::dump(Formatter *f) const +void old_inode_t<Allocator>::dump(ceph::Formatter *f) const { f->dump_unsigned("first", first); inode.dump(f); @@ -980,19 +984,19 @@ void old_inode_t<Allocator>::generate_test_instances(std::list<old_inode_t<Alloc std::list<inode_t<Allocator>*> ils; inode_t<Allocator>::generate_test_instances(ils); ls.back()->inode = *ils.back(); - ls.back()->xattrs["user.foo"] = buffer::copy("asdf", 4); - ls.back()->xattrs["user.unprintable"] = buffer::copy("\000\001\002", 3); + ls.back()->xattrs["user.foo"] = ceph::buffer::copy("asdf", 4); + ls.back()->xattrs["user.unprintable"] = ceph::buffer::copy("\000\001\002", 3); } template<template<typename> class Allocator> -inline void encode(const old_inode_t<Allocator> &c, ::ceph::bufferlist &bl, uint64_t features) +inline void encode(const old_inode_t<Allocator> &c, ::ceph::buffer::list &bl, uint64_t features) { ENCODE_DUMP_PRE(); c.encode(bl, features); ENCODE_DUMP_POST(cl); } template<template<typename> class Allocator> -inline void decode(old_inode_t<Allocator> &c, ::ceph::bufferlist::const_iterator &p) +inline void decode(old_inode_t<Allocator> &c, ::ceph::buffer::list::const_iterator &p) { c.decode(p); } @@ -1001,9 +1005,9 @@ inline void decode(old_inode_t<Allocator> &c, ::ceph::bufferlist::const_iterator * like an inode, but for a dir frag */ struct fnode_t { - void encode(bufferlist &bl) const; - void decode(bufferlist::const_iterator& bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list &bl) const; + void decode(ceph::buffer::list::const_iterator& bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<fnode_t*>& ls); version_t version = 0; @@ -1023,9 +1027,9 @@ WRITE_CLASS_ENCODER(fnode_t) struct old_rstat_t { - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator& p); - void dump(Formatter *f) const; + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator& p); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<old_rstat_t*>& ls); snapid_t first; @@ -1045,7 +1049,7 @@ public: feature_bitset_t(const feature_bitset_t& other) : _vec(other._vec) {} feature_bitset_t(feature_bitset_t&& other) : _vec(std::move(other._vec)) {} feature_bitset_t(unsigned long value = 0); - feature_bitset_t(const vector<size_t>& array); + feature_bitset_t(const std::vector<size_t>& array); feature_bitset_t& operator=(const feature_bitset_t& other) { _vec = other._vec; return *this; @@ -1071,12 +1075,12 @@ public: void clear() { _vec.clear(); } - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator &p); - void dump(Formatter *f) const; - void print(ostream& out) const; + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator &p); + void dump(ceph::Formatter *f) const; + void print(std::ostream& out) const; private: - vector<block_type> _vec; + std::vector<block_type> _vec; }; WRITE_CLASS_ENCODER(feature_bitset_t) @@ -1113,10 +1117,10 @@ struct metric_spec_t { metric_flags.clear(); } - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator& p); - void dump(Formatter *f) const; - void print(ostream& out) const; + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator& p); + void dump(ceph::Formatter *f) const; + void print(std::ostream& out) const; // set of metrics that a client is capable of forwarding feature_bitset_t metric_flags; @@ -1164,9 +1168,9 @@ struct client_metadata_t { metric_spec.clear(); } - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator& p); - void dump(Formatter *f) const; + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator& p); + void dump(ceph::Formatter *f) const; kv_map_t kv_map; feature_bitset_t features; @@ -1190,9 +1194,9 @@ struct session_info_t { client_metadata.clear(); } - void encode(bufferlist& bl, uint64_t features) const; - void decode(bufferlist::const_iterator& p); - void dump(Formatter *f) const; + void encode(ceph::buffer::list& bl, uint64_t features) const; + void decode(ceph::buffer::list::const_iterator& p); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<session_info_t*>& ls); entity_inst_t inst; @@ -1215,13 +1219,13 @@ struct dentry_key_t { // encode into something that can be decoded as a string. // name_ (head) or name_%x (!head) - void encode(bufferlist& bl) const { - string key; + void encode(ceph::buffer::list& bl) const { + std::string key; encode(key); using ceph::encode; encode(key, bl); } - void encode(string& key) const { + void encode(std::string& key) const { char b[20]; if (snapid != CEPH_NOSNAP) { uint64_t val(snapid); @@ -1229,18 +1233,20 @@ struct dentry_key_t { } else { snprintf(b, sizeof(b), "%s", "head"); } - ostringstream oss; + std::ostringstream oss; oss << name << "_" << b; key = oss.str(); } - static void decode_helper(bufferlist::const_iterator& bl, string& nm, snapid_t& sn) { - string key; + static void decode_helper(ceph::buffer::list::const_iterator& bl, std::string& nm, + snapid_t& sn) { + std::string key; + using ceph::decode; decode(key, bl); decode_helper(key, nm, sn); } - static void decode_helper(std::string_view key, string& nm, snapid_t& sn) { + static void decode_helper(std::string_view key, std::string& nm, snapid_t& sn) { size_t i = key.find_last_of('_'); - ceph_assert(i != string::npos); + ceph_assert(i != std::string::npos); if (key.compare(i+1, std::string_view::npos, "head") == 0) { // name_head sn = CEPH_NOSNAP; @@ -1285,12 +1291,12 @@ struct string_snap_t { string_snap_t() {} string_snap_t(std::string_view n, snapid_t s) : name(n), snapid(s) {} - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator& p); - void dump(Formatter *f) const; + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator& p); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<string_snap_t*>& ls); - string name; + std::string name; snapid_t snapid; }; WRITE_CLASS_ENCODER(string_snap_t) @@ -1312,9 +1318,9 @@ inline std::ostream& operator<<(std::ostream& out, const string_snap_t &k) * pending mutation state in the table. */ struct mds_table_pending_t { - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator& bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator& bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<mds_table_pending_t*>& ls); uint64_t reqid = 0; @@ -1327,12 +1333,12 @@ WRITE_CLASS_ENCODER(mds_table_pending_t) struct metareqid_t { metareqid_t() {} metareqid_t(entity_name_t n, ceph_tid_t t) : name(n), tid(t) {} - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; encode(name, bl); encode(tid, bl); } - void decode(bufferlist::const_iterator &p) { + void decode(ceph::buffer::list::const_iterator &p) { using ceph::decode; decode(name, p); decode(tid, p); @@ -1377,7 +1383,7 @@ namespace std { struct cap_reconnect_t { cap_reconnect_t() {} cap_reconnect_t(uint64_t cap_id, inodeno_t pino, std::string_view p, int w, int i, - inodeno_t sr, snapid_t sf, bufferlist& lb) : + inodeno_t sr, snapid_t sf, ceph::buffer::list& lb) : path(p) { capinfo.cap_id = cap_id; capinfo.wanted = w; @@ -1388,18 +1394,18 @@ struct cap_reconnect_t { snap_follows = sf; flockbl.claim(lb); } - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator& bl); - void encode_old(bufferlist& bl) const; - void decode_old(bufferlist::const_iterator& bl); + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator& bl); + void encode_old(ceph::buffer::list& bl) const; + void decode_old(ceph::buffer::list::const_iterator& bl); - void dump(Formatter *f) const; + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<cap_reconnect_t*>& ls); - string path; + std::string path; mutable ceph_mds_cap_reconnect capinfo = {}; snapid_t snap_follows = 0; - bufferlist flockbl; + ceph::buffer::list flockbl; }; WRITE_CLASS_ENCODER(cap_reconnect_t) @@ -1410,12 +1416,12 @@ struct snaprealm_reconnect_t { realm.seq = seq; realm.parent = parent; } - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator& bl); - void encode_old(bufferlist& bl) const; - void decode_old(bufferlist::const_iterator& bl); + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator& bl); + void encode_old(ceph::buffer::list& bl) const; + void decode_old(ceph::buffer::list::const_iterator& bl); - void dump(Formatter *f) const; + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<snaprealm_reconnect_t*>& ls); mutable ceph_mds_snaprealm_reconnect realm = {}; @@ -1455,18 +1461,18 @@ struct old_cap_reconnect_t { return n; } - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; encode(path, bl); encode(capinfo, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; decode(path, bl); decode(capinfo, bl); } - string path; + std::string path; old_ceph_mds_cap_reconnect capinfo; }; WRITE_CLASS_ENCODER(old_cap_reconnect_t) @@ -1476,12 +1482,12 @@ struct dirfrag_t { dirfrag_t() {} dirfrag_t(inodeno_t i, frag_t f) : ino(i), frag(f) { } - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; encode(ino, bl); encode(frag, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; decode(ino, bl); decode(frag, bl); @@ -1533,26 +1539,26 @@ public: inode_load_vec_t() : vec{DecayCounter(DecayRate()), DecayCounter(DecayRate())} {} inode_load_vec_t(const DecayRate &rate) : vec{DecayCounter(rate), DecayCounter(rate)} {} - DecayCounter &get(int t) { - return vec[t]; + DecayCounter &get(int t) { + return vec[t]; } void zero() { for (auto &d : vec) { d.reset(); } } - void encode(bufferlist &bl) const; - void decode(bufferlist::const_iterator& p); - void dump(Formatter *f) const; + void encode(ceph::buffer::list &bl) const; + void decode(ceph::buffer::list::const_iterator& p); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<inode_load_vec_t*>& ls); private: std::array<DecayCounter, NUM> vec; }; -inline void encode(const inode_load_vec_t &c, bufferlist &bl) { +inline void encode(const inode_load_vec_t &c, ceph::buffer::list &bl) { c.encode(bl); } -inline void decode(inode_load_vec_t & c, bufferlist::const_iterator &p) { +inline void decode(inode_load_vec_t & c, ceph::buffer::list::const_iterator &p) { c.decode(p); } @@ -1574,22 +1580,22 @@ public: vec{DecayCounter(rate), DecayCounter(rate), DecayCounter(rate), DecayCounter(rate), DecayCounter(rate)} {} - void encode(bufferlist &bl) const { + void encode(ceph::buffer::list &bl) const { ENCODE_START(2, 2, bl); for (const auto &i : vec) { encode(i, bl); } ENCODE_FINISH(bl); } - void decode(bufferlist::const_iterator &p) { + void decode(ceph::buffer::list::const_iterator &p) { DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, p); for (auto &i : vec) { decode(i, p); } DECODE_FINISH(p); } - void dump(Formatter *f) const; - void dump(Formatter *f, const DecayRate& rate) const; + void dump(ceph::Formatter *f) const; + void dump(ceph::Formatter *f, const DecayRate& rate) const; static void generate_test_instances(std::list<dirfrag_load_vec_t*>& ls); const DecayCounter &get(int t) const { @@ -1635,10 +1641,10 @@ private: std::array<DecayCounter, NUM> vec; }; -inline void encode(const dirfrag_load_vec_t &c, bufferlist &bl) { +inline void encode(const dirfrag_load_vec_t &c, ceph::buffer::list &bl) { c.encode(bl); } -inline void decode(dirfrag_load_vec_t& c, bufferlist::const_iterator &p) { +inline void decode(dirfrag_load_vec_t& c, ceph::buffer::list::const_iterator &p) { c.decode(p); } @@ -1673,15 +1679,15 @@ struct mds_load_t { double cpu_load_avg = 0.0; double mds_load() const; // defiend in MDBalancer.cc - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator& bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator& bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<mds_load_t*>& ls); }; -inline void encode(const mds_load_t &c, bufferlist &bl) { +inline void encode(const mds_load_t &c, ceph::buffer::list &bl) { c.encode(bl); } -inline void decode(mds_load_t &c, bufferlist::const_iterator &p) { +inline void decode(mds_load_t &c, ceph::buffer::list::const_iterator &p) { c.decode(p); } @@ -1743,14 +1749,14 @@ typedef std::pair<mds_rank_t, mds_rank_t> mds_authority_t; class MDSCacheObjectInfo { public: - void encode(bufferlist& bl) const; - void decode(bufferlist::const_iterator& bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list& bl) const; + void decode(ceph::buffer::list::const_iterator& bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<MDSCacheObjectInfo*>& ls); inodeno_t ino = 0; dirfrag_t dirfrag; - string dname; + std::string dname; snapid_t snapid; }; @@ -1774,7 +1780,7 @@ namespace qi = boost::spirit::qi; template <typename Iterator> struct keys_and_values - : qi::grammar<Iterator, std::map<string, string>()> + : qi::grammar<Iterator, std::map<std::string, std::string>()> { keys_and_values() : keys_and_values::base_type(query) @@ -1784,9 +1790,9 @@ struct keys_and_values key = qi::char_("a-zA-Z_") >> *qi::char_("a-zA-Z_0-9"); value = +qi::char_("a-zA-Z_0-9"); } - qi::rule<Iterator, std::map<string, string>()> query; - qi::rule<Iterator, std::pair<string, string>()> pair; - qi::rule<Iterator, string()> key, value; + qi::rule<Iterator, std::map<std::string, std::string>()> query; + qi::rule<Iterator, std::pair<std::string, std::string>()> pair; + qi::rule<Iterator, std::string()> key, value; }; #endif diff --git a/src/mds/snap.h b/src/mds/snap.h index 9ebadb1255b..227f84fccc2 100644 --- a/src/mds/snap.h +++ b/src/mds/snap.h @@ -26,9 +26,9 @@ * generic snap descriptor. */ struct SnapInfo { - void encode(bufferlist &bl) const; - void decode(bufferlist::const_iterator &bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list &bl) const; + void decode(ceph::buffer::list::const_iterator &bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<SnapInfo*>& ls); std::string_view get_long_name() const; @@ -36,9 +36,9 @@ struct SnapInfo { snapid_t snapid; inodeno_t ino; utime_t stamp; - string name; + std::string name; - mutable string long_name; ///< cached _$ino_$name + mutable std::string long_name; ///< cached _$ino_$name }; WRITE_CLASS_ENCODER(SnapInfo) @@ -48,7 +48,7 @@ inline bool operator==(const SnapInfo &l, const SnapInfo &r) l.stamp == r.stamp && l.name == r.name; } -ostream& operator<<(ostream& out, const SnapInfo &sn); +std::ostream& operator<<(std::ostream& out, const SnapInfo &sn); /* * SnapRealm - a subtree that shares the same set of snapshots. @@ -56,9 +56,9 @@ ostream& operator<<(ostream& out, const SnapInfo &sn); struct SnapRealm; struct snaplink_t { - void encode(bufferlist &bl) const; - void decode(bufferlist::const_iterator &bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list &bl) const; + void decode(ceph::buffer::list::const_iterator &bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<snaplink_t*>& ls); inodeno_t ino; @@ -66,7 +66,7 @@ struct snaplink_t { }; WRITE_CLASS_ENCODER(snaplink_t) -ostream& operator<<(ostream& out, const snaplink_t &l); +std::ostream& operator<<(std::ostream& out, const snaplink_t &l); // carry data about a specific version of a SnapRealm struct sr_t { @@ -74,9 +74,9 @@ struct sr_t { void clear_parent_global() { flags &= ~PARENT_GLOBAL; } bool is_parent_global() const { return flags & PARENT_GLOBAL; } - void encode(bufferlist &bl) const; - void decode(bufferlist::const_iterator &bl); - void dump(Formatter *f) const; + void encode(ceph::buffer::list &bl) const; + void decode(ceph::buffer::list::const_iterator &bl); + void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<sr_t*>& ls); snapid_t seq = 0; // basically, a version/seq # for changes to _this_ realm. @@ -84,9 +84,9 @@ struct sr_t { snapid_t last_created = 0; // last snap created in _this_ realm. snapid_t last_destroyed = 0; // seq for last removal snapid_t current_parent_since = 1; - map<snapid_t, SnapInfo> snaps; - map<snapid_t, snaplink_t> past_parents; // key is "last" (or NOSNAP) - set<snapid_t> past_parent_snaps; + std::map<snapid_t, SnapInfo> snaps; + std::map<snapid_t, snaplink_t> past_parents; // key is "last" (or NOSNAP) + std::set<snapid_t> past_parent_snaps; __u32 flags = 0; enum { diff --git a/src/messages/MBackfillReserve.h b/src/messages/MBackfillReserve.h index e431a52b810..fbb262b832c 100644 --- a/src/messages/MBackfillReserve.h +++ b/src/messages/MBackfillReserve.h @@ -110,7 +110,7 @@ public: return "MBackfillReserve"; } - void inner_print(ostream& out) const override { + void inner_print(std::ostream& out) const override { switch (type) { case REQUEST: out << "REQUEST"; @@ -137,6 +137,7 @@ public: void decode_payload() override { auto p = payload.cbegin(); + using ceph::decode; decode(pgid.pgid, p); decode(query_epoch, p); decode(type, p); diff --git a/src/messages/MCacheExpire.h b/src/messages/MCacheExpire.h index 4645e813226..8cd5d796a82 100644 --- a/src/messages/MCacheExpire.h +++ b/src/messages/MCacheExpire.h @@ -31,9 +31,9 @@ public: that makes it less work to process when exports are in progress. */ struct realm { - map<vinodeno_t, uint32_t> inodes; - map<dirfrag_t, uint32_t> dirs; - map<dirfrag_t, map<pair<string,snapid_t>,uint32_t> > dentries; + std::map<vinodeno_t, uint32_t> inodes; + std::map<dirfrag_t, uint32_t> dirs; + std::map<dirfrag_t, std::map<std::pair<std::string,snapid_t>,uint32_t> > dentries; void merge(const realm& o) { inodes.insert(o.inodes.begin(), o.inodes.end()); @@ -46,13 +46,13 @@ public: } } - void encode(bufferlist &bl) const { + void encode(ceph::buffer::list &bl) const { using ceph::encode; encode(inodes, bl); encode(dirs, bl); encode(dentries, bl); } - void decode(bufferlist::const_iterator &bl) { + void decode(ceph::buffer::list::const_iterator &bl) { using ceph::decode; decode(inodes, bl); decode(dirs, bl); @@ -61,20 +61,20 @@ public: }; WRITE_CLASS_ENCODER(realm) - map<dirfrag_t, realm> realms; + std::map<dirfrag_t, realm> realms; int get_from() const { return from; } protected: MCacheExpire() : SafeMessage{MSG_MDS_CACHEEXPIRE}, from(-1) {} - MCacheExpire(int f) : + MCacheExpire(int f) : SafeMessage{MSG_MDS_CACHEEXPIRE}, from(f) { } ~MCacheExpire() override {} public: std::string_view get_type_name() const override { return "cache_expire";} - + void add_inode(dirfrag_t r, vinodeno_t vino, unsigned nonce) { realms[r].inodes[vino] = nonce; } @@ -82,7 +82,7 @@ public: realms[r].dirs[df] = nonce; } void add_dentry(dirfrag_t r, dirfrag_t df, std::string_view dn, snapid_t last, unsigned nonce) { - realms[r].dentries[df][pair<string,snapid_t>(dn,last)] = nonce; + realms[r].dentries[df][std::pair<std::string,snapid_t>(dn,last)] = nonce; } void add_realm(dirfrag_t df, const realm& r) { @@ -98,7 +98,7 @@ public: decode(from, p); decode(realms, p); } - + void encode_payload(uint64_t features) override { using ceph::encode; encode(from, payload); diff --git a/src/messages/MClientCapRelease.h b/src/messages/MClientCapRelease.h index f9442c981f1..856c0df686d 100644 --- a/src/messages/MClientCapRelease.h +++ b/src/messages/MClientCapRelease.h @@ -21,14 +21,15 @@ class MClientCapRelease : public SafeMessage { public: std::string_view get_type_name() const override { return "client_cap_release";} - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "client_cap_release(" << caps.size() << ")"; } - + void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(head, p); - decode_nohead(head.num, caps, p); + ceph::decode_nohead(head.num, caps, p); if (header.version >= 2) { decode(osd_epoch_barrier, p); } @@ -37,12 +38,12 @@ class MClientCapRelease : public SafeMessage { using ceph::encode; head.num = caps.size(); encode(head, payload); - encode_nohead(caps, payload); + ceph::encode_nohead(caps, payload); encode(osd_epoch_barrier, payload); } struct ceph_mds_cap_release head; - vector<ceph_mds_cap_item> caps; + std::vector<ceph_mds_cap_item> caps; // The message receiver must wait for this OSD epoch // before actioning this cap release. diff --git a/src/messages/MClientCaps.h b/src/messages/MClientCaps.h index 99ef6a1954e..8b441b185a4 100644 --- a/src/messages/MClientCaps.h +++ b/src/messages/MClientCaps.h @@ -44,11 +44,11 @@ private: struct ceph_mds_cap_peer peer; - bufferlist snapbl; - bufferlist xattrbl; - bufferlist flockbl; + ceph::buffer::list snapbl; + ceph::buffer::list xattrbl; + ceph::buffer::list flockbl; version_t inline_version = 0; - bufferlist inline_data; + ceph::buffer::list inline_data; // Receivers may not use their new caps until they have this OSD map epoch_t osd_epoch_barrier = 0; @@ -174,7 +174,7 @@ private: public: std::string_view get_type_name() const override { return "Cfcap";} - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "client_caps(" << ceph_cap_op_name(head.op) << " ino " << inodeno_t(head.ino) << " " << head.cap_id @@ -200,8 +200,9 @@ public: out << ")"; } - + void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(head, p); ceph_mds_caps_body_legacy body; @@ -219,7 +220,7 @@ public: layout.from_legacy(body.layout); time_warp_seq = body.time_warp_seq; } - decode_nohead(head.snap_trace_len, snapbl, p); + ceph::decode_nohead(head.snap_trace_len, snapbl, p); ceph_assert(middle.length() == head.xattr_len); if (head.xattr_len) @@ -289,7 +290,7 @@ public: body.time_warp_seq = time_warp_seq; } encode(body, payload); - encode_nohead(snapbl, payload); + ceph::encode_nohead(snapbl, payload); middle = xattrbl; @@ -314,7 +315,7 @@ public: encode(inline_data, payload); } else { encode(inline_version, payload); - encode(bufferlist(), payload); + encode(ceph::buffer::list(), payload); } encode(osd_epoch_barrier, payload); diff --git a/src/messages/MClientLease.h b/src/messages/MClientLease.h index 52c5883d584..85ecb378993 100644 --- a/src/messages/MClientLease.h +++ b/src/messages/MClientLease.h @@ -63,7 +63,7 @@ protected: public: std::string_view get_type_name() const override { return "client_lease"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "client_lease(a=" << ceph_lease_op_name(get_action()) << " seq " << get_seq() << " mask " << get_mask(); @@ -74,8 +74,9 @@ public: out << "/" << dname; out << ")"; } - + void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(h, p); decode(dname, p); diff --git a/src/messages/MClientQuota.h b/src/messages/MClientQuota.h index 817a88c1393..56df681b62a 100644 --- a/src/messages/MClientQuota.h +++ b/src/messages/MClientQuota.h @@ -18,7 +18,7 @@ protected: public: std::string_view get_type_name() const override { return "client_quota"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "client_quota("; out << " [" << ino << "] "; out << rstat << " "; @@ -36,6 +36,7 @@ public: encode(quota, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(ino, p); decode(rstat.rctime, p); diff --git a/src/messages/MClientReclaim.h b/src/messages/MClientReclaim.h index 03bad8d6401..45c2540e218 100644 --- a/src/messages/MClientReclaim.h +++ b/src/messages/MClientReclaim.h @@ -28,7 +28,7 @@ public: std::string_view get_uuid() const { return uuid; } std::string_view get_type_name() const override { return "client_reclaim"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { std::ios_base::fmtflags f(o.flags()); o << "client_reclaim(" << get_uuid() << " flags 0x" << std::hex << get_flags() << ")"; o.flags(f); diff --git a/src/messages/MClientReclaimReply.h b/src/messages/MClientReclaimReply.h index b91b588b35f..49fab0a6c3f 100644 --- a/src/messages/MClientReclaimReply.h +++ b/src/messages/MClientReclaimReply.h @@ -31,7 +31,7 @@ public: void set_addrs(const entity_addrvec_t& _addrs) { addrs = _addrs; } std::string_view get_type_name() const override { return "client_reclaim_reply"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "client_reclaim_reply(" << result << " e " << epoch << ")"; } diff --git a/src/messages/MClientReconnect.h b/src/messages/MClientReconnect.h index e4592c7b01b..2e44bd64918 100644 --- a/src/messages/MClientReconnect.h +++ b/src/messages/MClientReconnect.h @@ -26,8 +26,8 @@ private: static constexpr int COMPAT_VERSION = 4; public: - map<inodeno_t, cap_reconnect_t> caps; // only head inodes - vector<snaprealm_reconnect_t> realms; + std::map<inodeno_t, cap_reconnect_t> caps; // only head inodes + std::vector<snaprealm_reconnect_t> realms; bool more = false; private: @@ -42,7 +42,7 @@ private: void calc_item_size() { using ceph::encode; { - bufferlist bl; + ceph::buffer::list bl; inodeno_t ino; cap_reconnect_t cr; encode(ino, bl); @@ -50,7 +50,7 @@ private: cap_size = bl.length(); } { - bufferlist bl; + ceph::buffer::list bl; snaprealm_reconnect_t sr; encode(sr, bl); realm_size = bl.length(); @@ -59,7 +59,7 @@ private: public: std::string_view get_type_name() const override { return "client_reconnect"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "client_reconnect(" << caps.size() << " caps " << realms.size() << " realms )"; } @@ -77,8 +77,8 @@ public: void mark_more() { more = true; } bool has_more() const { return more; } - void add_cap(inodeno_t ino, uint64_t cap_id, inodeno_t pathbase, const string& path, - int wanted, int issued, inodeno_t sr, snapid_t sf, bufferlist& lb) + void add_cap(inodeno_t ino, uint64_t cap_id, inodeno_t pathbase, const std::string& path, + int wanted, int issued, inodeno_t sr, snapid_t sf, ceph::buffer::list& lb) { caps[ino] = cap_reconnect_t(cap_id, pathbase, path, wanted, issued, sr, sf, lb); if (!cap_size) @@ -125,7 +125,7 @@ public: p.second.encode_old(data); } } else { - map<inodeno_t, old_cap_reconnect_t> ocaps; + std::map<inodeno_t, old_cap_reconnect_t> ocaps; for (auto& p : caps) { ocaps[p.first] = p.second; encode(ocaps, data); @@ -136,6 +136,7 @@ public: } } void decode_payload() override { + using ceph::decode; auto p = data.cbegin(); if (header.version >= 4) { decode(caps, p); @@ -155,7 +156,7 @@ public: caps[ino].decode_old(p); } } else { - map<inodeno_t, old_cap_reconnect_t> ocaps; + std::map<inodeno_t, old_cap_reconnect_t> ocaps; decode(ocaps, p); for (auto &q : ocaps) caps[q.first] = q.second; diff --git a/src/messages/MClientReply.h b/src/messages/MClientReply.h index ed45185a9dd..ccf2b6ac340 100644 --- a/src/messages/MClientReply.h +++ b/src/messages/MClientReply.h @@ -54,7 +54,7 @@ struct LeaseStat { LeaseStat() : mask(0), duration_ms(0), seq(0) {} LeaseStat(__u16 msk, __u32 dur, __u32 sq) : mask{msk}, duration_ms{dur}, seq{sq} {} - void decode(bufferlist::const_iterator &bl, const uint64_t features) { + void decode(ceph::buffer::list::const_iterator &bl, const uint64_t features) { using ceph::decode; if (features == (uint64_t)-1) { DECODE_START(1, bl); @@ -71,7 +71,7 @@ struct LeaseStat { } }; -inline ostream& operator<<(ostream& out, const LeaseStat& l) { +inline std::ostream& operator<<(std::ostream& out, const LeaseStat& l) { return out << "lease(mask " << l.mask << " dur " << l.duration_ms << ")"; } @@ -79,14 +79,14 @@ struct DirStat { // mds distribution hints frag_t frag; __s32 auth; - set<__s32> dist; + std::set<__s32> dist; DirStat() : auth(CDIR_AUTH_PARENT) {} - DirStat(bufferlist::const_iterator& p, const uint64_t features) { + DirStat(ceph::buffer::list::const_iterator& p, const uint64_t features) { decode(p, features); } - void decode(bufferlist::const_iterator& p, const uint64_t features) { + void decode(ceph::buffer::list::const_iterator& p, const uint64_t features) { using ceph::decode; if (features == (uint64_t)-1) { DECODE_START(1, p); @@ -123,13 +123,13 @@ struct InodeStat { nest_info_t rstat; fragtree_t dirfragtree; - string symlink; // symlink content (if symlink) + std::string symlink; // symlink content (if symlink) ceph_dir_layout dir_layout; - bufferlist xattrbl; + ceph::buffer::list xattrbl; - bufferlist inline_data; + ceph::buffer::list inline_data; version_t inline_version; quota_info_t quota; @@ -138,11 +138,11 @@ struct InodeStat { public: InodeStat() {} - InodeStat(bufferlist::const_iterator& p, const uint64_t features) { + InodeStat(ceph::buffer::list::const_iterator& p, const uint64_t features) { decode(p, features); } - void decode(bufferlist::const_iterator &p, const uint64_t features) { + void decode(ceph::buffer::list::const_iterator &p, const uint64_t features) { using ceph::decode; if (features == (uint64_t)-1) { DECODE_START(2, p); @@ -274,7 +274,7 @@ public: encode(delegated_inos, bl); ENCODE_FINISH(bl); } - void decode(bufferlist::const_iterator &p) { + void decode(ceph::buffer::list::const_iterator &p) { using ceph::decode; DECODE_START(1, p); decode(created_ino, p); @@ -288,9 +288,9 @@ class MClientReply : public SafeMessage { public: // reply data struct ceph_mds_reply_head head {}; - bufferlist trace_bl; - bufferlist extra_bl; - bufferlist snapbl; + ceph::buffer::list trace_bl; + ceph::buffer::list extra_bl; + ceph::buffer::list snapbl; int get_op() const { return head.op; } @@ -321,7 +321,7 @@ protected: public: std::string_view get_type_name() const override { return "creply"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "client_reply(???:" << get_tid(); o << " = " << get_result(); if (get_result() <= 0) { @@ -338,6 +338,7 @@ public: // serialization void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(head, p); decode(trace_bl, p); @@ -355,24 +356,24 @@ public: // dir contents - void set_extra_bl(bufferlist& bl) { + void set_extra_bl(ceph::buffer::list& bl) { extra_bl.claim(bl); } - bufferlist& get_extra_bl() { + ceph::buffer::list& get_extra_bl() { return extra_bl; } - const bufferlist& get_extra_bl() const { + const ceph::buffer::list& get_extra_bl() const { return extra_bl; } // trace - void set_trace(bufferlist& bl) { + void set_trace(ceph::buffer::list& bl) { trace_bl.claim(bl); } - bufferlist& get_trace_bl() { + ceph::buffer::list& get_trace_bl() { return trace_bl; } - const bufferlist& get_trace_bl() const { + const ceph::buffer::list& get_trace_bl() const { return trace_bl; } private: diff --git a/src/messages/MClientRequest.h b/src/messages/MClientRequest.h index 29c60ddcb7c..204f1e71197 100644 --- a/src/messages/MClientRequest.h +++ b/src/messages/MClientRequest.h @@ -59,29 +59,29 @@ public: struct Release { mutable ceph_mds_request_release item; - string dname; + std::string dname; Release() : item(), dname() {} - Release(const ceph_mds_request_release& rel, string name) : + Release(const ceph_mds_request_release& rel, std::string name) : item(rel), dname(name) {} - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; item.dname_len = dname.length(); encode(item, bl); - encode_nohead(dname, bl); + ceph::encode_nohead(dname, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; decode(item, bl); - decode_nohead(item.dname_len, dname, bl); + ceph::decode_nohead(item.dname_len, dname, bl); } }; - mutable vector<Release> releases; /* XXX HACK! */ + mutable std::vector<Release> releases; /* XXX HACK! */ // path arguments filepath path, path2; - vector<uint64_t> gid_list; + std::vector<uint64_t> gid_list; /* XXX HACK */ mutable bool queued_for_replay = false; @@ -169,11 +169,11 @@ public: int get_op() const { return head.op; } unsigned get_caller_uid() const { return head.caller_uid; } unsigned get_caller_gid() const { return head.caller_gid; } - const vector<uint64_t>& get_caller_gid_list() const { return gid_list; } + const std::vector<uint64_t>& get_caller_gid_list() const { return gid_list; } - const string& get_path() const { return path.get_path(); } + const std::string& get_path() const { return path.get_path(); } const filepath& get_filepath() const { return path; } - const string& get_path2() const { return path2.get_path(); } + const std::string& get_path2() const { return path2.get_path(); } const filepath& get_filepath2() const { return path2; } int get_dentry_wanted() const { return get_flags() & CEPH_MDS_FLAG_WANT_DENTRY; } @@ -182,6 +182,7 @@ public: bool is_queued_for_replay() const { return queued_for_replay; } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); if (header.version >= 4) { @@ -206,7 +207,7 @@ public: decode(path, p); decode(path2, p); - decode_nohead(head.num_releases, releases, p); + ceph::decode_nohead(head.num_releases, releases, p); if (header.version >= 2) decode(stamp, p); if (header.version >= 4) // epoch 3 was for a ceph_mds_request_args change @@ -229,15 +230,15 @@ public: encode(path, payload); encode(path2, payload); - encode_nohead(releases, payload); + ceph::encode_nohead(releases, payload); encode(stamp, payload); encode(gid_list, payload); } std::string_view get_type_name() const override { return "creq"; } - void print(ostream& out) const override { - out << "client_request(" << get_orig_source() - << ":" << get_tid() + void print(std::ostream& out) const override { + out << "client_request(" << get_orig_source() + << ":" << get_tid() << " " << ceph_mds_op_name(get_op()); if (head.op == CEPH_MDS_OP_GETATTR) out << " " << ccap_string(head.args.getattr.mask); diff --git a/src/messages/MClientRequestForward.h b/src/messages/MClientRequestForward.h index b0aeebebae8..93579fefe4e 100644 --- a/src/messages/MClientRequestForward.h +++ b/src/messages/MClientRequestForward.h @@ -42,7 +42,7 @@ public: bool must_resend() const { return client_must_resend; } std::string_view get_type_name() const override { return "client_request_forward"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "client_request_forward(" << get_tid() << " to mds." << dest_mds << " num_fwd=" << num_fwd @@ -58,6 +58,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(dest_mds, p); decode(num_fwd, p); diff --git a/src/messages/MClientSession.h b/src/messages/MClientSession.h index d129fb90bf5..91906861d7a 100644 --- a/src/messages/MClientSession.h +++ b/src/messages/MClientSession.h @@ -55,7 +55,7 @@ protected: public: std::string_view get_type_name() const override { return "client_session"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "client_session(" << ceph_session_op_name(get_op()); if (get_seq()) out << " seq " << get_seq(); @@ -64,7 +64,8 @@ public: out << ")"; } - void decode_payload() override { + void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(head, p); if (header.version >= 2) diff --git a/src/messages/MClientSnap.h b/src/messages/MClientSnap.h index 85c36af1bea..fbb074cf3bc 100644 --- a/src/messages/MClientSnap.h +++ b/src/messages/MClientSnap.h @@ -20,11 +20,11 @@ class MClientSnap : public SafeMessage { public: ceph_mds_snap_head head; - bufferlist bl; + ceph::buffer::list bl; // (for split only) - vector<inodeno_t> split_inos; - vector<inodeno_t> split_realms; + std::vector<inodeno_t> split_inos; + std::vector<inodeno_t> split_realms; protected: MClientSnap(int o=0) : @@ -36,7 +36,7 @@ protected: public: std::string_view get_type_name() const override { return "client_snap"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "client_snap(" << ceph_snap_op_name(head.op); if (head.split) out << " split=" << inodeno_t(head.split); @@ -50,16 +50,17 @@ public: head.num_split_realms = split_realms.size(); head.trace_len = bl.length(); encode(head, payload); - encode_nohead(split_inos, payload); - encode_nohead(split_realms, payload); - encode_nohead(bl, payload); + ceph::encode_nohead(split_inos, payload); + ceph::encode_nohead(split_realms, payload); + ceph::encode_nohead(bl, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(head, p); - decode_nohead(head.num_split_inos, split_inos, p); - decode_nohead(head.num_split_realms, split_realms, p); - decode_nohead(head.trace_len, bl, p); + ceph::decode_nohead(head.num_split_inos, split_inos, p); + ceph::decode_nohead(head.num_split_realms, split_realms, p); + ceph::decode_nohead(head.trace_len, bl, p); ceph_assert(p.end()); } private: diff --git a/src/messages/MDentryLink.h b/src/messages/MDentryLink.h index 0b101683e83..5a1ce9c4e6f 100644 --- a/src/messages/MDentryLink.h +++ b/src/messages/MDentryLink.h @@ -27,16 +27,16 @@ private: dirfrag_t subtree; dirfrag_t dirfrag; - string dn; + std::string dn; bool is_primary = false; public: dirfrag_t get_subtree() const { return subtree; } dirfrag_t get_dirfrag() const { return dirfrag; } - const string& get_dn() const { return dn; } + const std::string& get_dn() const { return dn; } bool get_is_primary() const { return is_primary; } - bufferlist bl; + ceph::buffer::list bl; protected: MDentryLink() : @@ -51,11 +51,12 @@ protected: public: std::string_view get_type_name() const override { return "dentry_link";} - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "dentry_link(" << dirfrag << " " << dn << ")"; } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(subtree, p); decode(dirfrag, p); diff --git a/src/messages/MDentryUnlink.h b/src/messages/MDentryUnlink.h index ee5d285ad44..3037acec43f 100644 --- a/src/messages/MDentryUnlink.h +++ b/src/messages/MDentryUnlink.h @@ -26,14 +26,14 @@ private: static const int COMPAT_VERSION = 1; dirfrag_t dirfrag; - string dn; + std::string dn; public: dirfrag_t get_dirfrag() const { return dirfrag; } - const string& get_dn() const { return dn; } + const std::string& get_dn() const { return dn; } - bufferlist straybl; - bufferlist snapbl; + ceph::buffer::list straybl; + ceph::buffer::list snapbl; protected: MDentryUnlink() : @@ -46,11 +46,12 @@ protected: public: std::string_view get_type_name() const override { return "dentry_unlink";} - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "dentry_unlink(" << dirfrag << " " << dn << ")"; } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(dirfrag, p); decode(dn, p); diff --git a/src/messages/MDirUpdate.h b/src/messages/MDirUpdate.h index 46036ad03e6..8a2629f19c2 100644 --- a/src/messages/MDirUpdate.h +++ b/src/messages/MDirUpdate.h @@ -31,11 +31,12 @@ public: void inc_tried_discover() const { ++tried_discover; } std::string_view get_type_name() const override { return "dir_update"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "dir_update(" << get_dirfrag() << ")"; } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(from_mds, p); decode(dirfrag, p); diff --git a/src/messages/MDiscover.h b/src/messages/MDiscover.h index 9c8cdc0d32c..c821d7bfc6a 100644 --- a/src/messages/MDiscover.h +++ b/src/messages/MDiscover.h @@ -68,12 +68,13 @@ protected: public: std::string_view get_type_name() const override { return "Dis"; } - void print(ostream &out) const override { + void print(std::ostream &out) const override { out << "discover(" << header.tid << " " << base_ino << "." << base_dir_frag << " " << want << ")"; } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(base_ino, p); decode(base_dir_frag, p); diff --git a/src/messages/MDiscoverReply.h b/src/messages/MDiscoverReply.h index 56b37c3ee93..7a491406bd7 100644 --- a/src/messages/MDiscoverReply.h +++ b/src/messages/MDiscoverReply.h @@ -85,7 +85,7 @@ private: public: __u8 starts_with = 0; - bufferlist trace; + ceph::buffer::list trace; enum { DIR, DENTRY, INODE }; @@ -145,10 +145,10 @@ protected: public: std::string_view get_type_name() const override { return "discover_reply"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "discover_reply(" << header.tid << " " << base_ino << ")"; } - + // builders bool is_empty() const { return trace.length() == 0 && @@ -159,11 +159,11 @@ public: // void set_flag_forward() { flag_forward = true; } void set_flag_error_dn(std::string_view dn) { - flag_error_dn = true; - error_dentry = dn; + flag_error_dn = true; + error_dentry = dn; } - void set_flag_error_dir() { - flag_error_dir = true; + void set_flag_error_dir() { + flag_error_dir = true; } void set_dir_auth_hint(int a) { dir_auth_hint = a; @@ -175,6 +175,7 @@ public: // ... void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(base_ino, p); decode(base_dir_frag, p); diff --git a/src/messages/MExportCaps.h b/src/messages/MExportCaps.h index 90f9864a5f8..d37851b8783 100644 --- a/src/messages/MExportCaps.h +++ b/src/messages/MExportCaps.h @@ -26,9 +26,9 @@ private: public: inodeno_t ino; - bufferlist cap_bl; - map<client_t,entity_inst_t> client_map; - map<client_t,client_metadata_t> client_metadata_map; + ceph::buffer::list cap_bl; + std::map<client_t,entity_inst_t> client_map; + std::map<client_t,client_metadata_t> client_metadata_map; protected: MExportCaps() : @@ -37,7 +37,7 @@ protected: public: std::string_view get_type_name() const override { return "export_caps"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "export_caps(" << ino << ")"; } @@ -49,6 +49,7 @@ public: encode(client_metadata_map, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(ino, p); decode(cap_bl, p); diff --git a/src/messages/MExportCapsAck.h b/src/messages/MExportCapsAck.h index 75ec3da37d7..f5505cdb365 100644 --- a/src/messages/MExportCapsAck.h +++ b/src/messages/MExportCapsAck.h @@ -25,7 +25,7 @@ class MExportCapsAck : public SafeMessage { public: inodeno_t ino; - bufferlist cap_bl; + ceph::buffer::list cap_bl; protected: MExportCapsAck() : @@ -36,7 +36,7 @@ protected: public: std::string_view get_type_name() const override { return "export_caps_ack"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "export_caps_ack(" << ino << ")"; } @@ -46,6 +46,7 @@ public: encode(cap_bl, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(ino, p); decode(cap_bl, p); diff --git a/src/messages/MExportDir.h b/src/messages/MExportDir.h index b9e18188b36..f2663015b85 100644 --- a/src/messages/MExportDir.h +++ b/src/messages/MExportDir.h @@ -22,9 +22,9 @@ class MExportDir : public SafeMessage { public: dirfrag_t dirfrag; - bufferlist export_data; - vector<dirfrag_t> bounds; - bufferlist client_map; + ceph::buffer::list export_data; + std::vector<dirfrag_t> bounds; + ceph::buffer::list client_map; protected: MExportDir() : SafeMessage{MSG_MDS_EXPORTDIR} {} @@ -36,7 +36,7 @@ protected: public: std::string_view get_type_name() const override { return "Ex"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "export(" << dirfrag << ")"; } @@ -52,6 +52,7 @@ public: encode(client_map, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(dirfrag, p); decode(bounds, p); diff --git a/src/messages/MExportDirAck.h b/src/messages/MExportDirAck.h index 8e3548cd397..fcbd09ad9cf 100644 --- a/src/messages/MExportDirAck.h +++ b/src/messages/MExportDirAck.h @@ -21,7 +21,7 @@ class MExportDirAck : public SafeMessage { public: dirfrag_t dirfrag; - bufferlist imported_caps; + ceph::buffer::list imported_caps; dirfrag_t get_dirfrag() const { return dirfrag; } @@ -35,11 +35,12 @@ protected: public: std::string_view get_type_name() const override { return "ExAck"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "export_ack(" << dirfrag << ")"; } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(dirfrag, p); decode(imported_caps, p); diff --git a/src/messages/MExportDirCancel.h b/src/messages/MExportDirCancel.h index b26c3c0f37b..df14a134c45 100644 --- a/src/messages/MExportDirCancel.h +++ b/src/messages/MExportDirCancel.h @@ -37,7 +37,7 @@ protected: public: std::string_view get_type_name() const override { return "ExCancel"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "export_cancel(" << dirfrag << ")"; } @@ -46,6 +46,7 @@ public: encode(dirfrag, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(dirfrag, p); } diff --git a/src/messages/MExportDirDiscover.h b/src/messages/MExportDirDiscover.h index d6f9cad1a03..62d9a1481e1 100644 --- a/src/messages/MExportDirDiscover.h +++ b/src/messages/MExportDirDiscover.h @@ -47,11 +47,12 @@ protected: public: std::string_view get_type_name() const override { return "ExDis"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "export_discover(" << dirfrag << " " << path << ")"; } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(from, p); decode(dirfrag, p); diff --git a/src/messages/MExportDirDiscoverAck.h b/src/messages/MExportDirDiscoverAck.h index e71e2898bd6..f5f77de75a8 100644 --- a/src/messages/MExportDirDiscoverAck.h +++ b/src/messages/MExportDirDiscoverAck.h @@ -42,7 +42,7 @@ protected: public: std::string_view get_type_name() const override { return "ExDisA"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "export_discover_ack(" << dirfrag; if (success) o << " success)"; @@ -51,6 +51,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(dirfrag, p); decode(success, p); diff --git a/src/messages/MExportDirFinish.h b/src/messages/MExportDirFinish.h index 579f34bd74f..d9e216759e0 100644 --- a/src/messages/MExportDirFinish.h +++ b/src/messages/MExportDirFinish.h @@ -40,7 +40,7 @@ protected: public: std::string_view get_type_name() const override { return "ExFin"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "export_finish(" << dirfrag << (last ? " last" : "") << ")"; } @@ -50,6 +50,7 @@ public: encode(last, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(dirfrag, p); decode(last, p); diff --git a/src/messages/MExportDirNotify.h b/src/messages/MExportDirNotify.h index a33881882ce..5419529589e 100644 --- a/src/messages/MExportDirNotify.h +++ b/src/messages/MExportDirNotify.h @@ -24,21 +24,22 @@ private: dirfrag_t base; bool ack; - pair<__s32,__s32> old_auth, new_auth; - list<dirfrag_t> bounds; // bounds; these dirs are _not_ included (tho the dirfragdes are) + std::pair<__s32,__s32> old_auth, new_auth; + std::list<dirfrag_t> bounds; // bounds; these dirs are _not_ included (tho the dirfragdes are) public: dirfrag_t get_dirfrag() const { return base; } - pair<__s32,__s32> get_old_auth() const { return old_auth; } - pair<__s32,__s32> get_new_auth() const { return new_auth; } + std::pair<__s32,__s32> get_old_auth() const { return old_auth; } + std::pair<__s32,__s32> get_new_auth() const { return new_auth; } bool wants_ack() const { return ack; } - const list<dirfrag_t>& get_bounds() const { return bounds; } - list<dirfrag_t>& get_bounds() { return bounds; } + const std::list<dirfrag_t>& get_bounds() const { return bounds; } + std::list<dirfrag_t>& get_bounds() { return bounds; } protected: MExportDirNotify() : SafeMessage{MSG_MDS_EXPORTDIRNOTIFY, HEAD_VERSION, COMPAT_VERSION} {} - MExportDirNotify(dirfrag_t i, uint64_t tid, bool a, pair<__s32,__s32> oa, pair<__s32,__s32> na) : + MExportDirNotify(dirfrag_t i, uint64_t tid, bool a, std::pair<__s32,__s32> oa, + std::pair<__s32,__s32> na) : SafeMessage{MSG_MDS_EXPORTDIRNOTIFY, HEAD_VERSION, COMPAT_VERSION}, base(i), ack(a), old_auth(oa), new_auth(na) { set_tid(tid); @@ -47,7 +48,7 @@ protected: public: std::string_view get_type_name() const override { return "ExNot"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "export_notify(" << base; o << " " << old_auth << " -> " << new_auth; if (ack) @@ -56,12 +57,11 @@ public: o << " no ack)"; } - void copy_bounds(list<dirfrag_t>& ex) { + void copy_bounds(std::list<dirfrag_t>& ex) { this->bounds = ex; } - void copy_bounds(set<dirfrag_t>& ex) { - for (set<dirfrag_t>::iterator i = ex.begin(); - i != ex.end(); ++i) + void copy_bounds(std::set<dirfrag_t>& ex) { + for (auto i = ex.begin(); i != ex.end(); ++i) bounds.push_back(*i); } @@ -74,6 +74,7 @@ public: encode(bounds, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(base, p); decode(ack, p); diff --git a/src/messages/MExportDirNotifyAck.h b/src/messages/MExportDirNotifyAck.h index 5bb6616fd34..f9e4a98b010 100644 --- a/src/messages/MExportDirNotifyAck.h +++ b/src/messages/MExportDirNotifyAck.h @@ -23,16 +23,16 @@ private: static const int COMPAT_VERSION = 1; dirfrag_t dirfrag; - pair<__s32,__s32> new_auth; + std::pair<__s32,__s32> new_auth; public: dirfrag_t get_dirfrag() const { return dirfrag; } - pair<__s32,__s32> get_new_auth() const { return new_auth; } + std::pair<__s32,__s32> get_new_auth() const { return new_auth; } protected: MExportDirNotifyAck() : SafeMessage{MSG_MDS_EXPORTDIRNOTIFYACK, HEAD_VERSION, COMPAT_VERSION} {} - MExportDirNotifyAck(dirfrag_t df, uint64_t tid, pair<__s32,__s32> na) : + MExportDirNotifyAck(dirfrag_t df, uint64_t tid, std::pair<__s32,__s32> na) : SafeMessage{MSG_MDS_EXPORTDIRNOTIFYACK, HEAD_VERSION, COMPAT_VERSION}, dirfrag(df), new_auth(na) { set_tid(tid); } @@ -40,7 +40,7 @@ protected: public: std::string_view get_type_name() const override { return "ExNotA"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "export_notify_ack(" << dirfrag << ")"; } diff --git a/src/messages/MExportDirPrep.h b/src/messages/MExportDirPrep.h index 7500c5ab070..e390b748e01 100644 --- a/src/messages/MExportDirPrep.h +++ b/src/messages/MExportDirPrep.h @@ -25,18 +25,18 @@ private: static const int COMPAT_VERSION = 1; dirfrag_t dirfrag; - public: - bufferlist basedir; - list<dirfrag_t> bounds; - list<bufferlist> traces; +public: + ceph::buffer::list basedir; + std::list<dirfrag_t> bounds; + std::list<ceph::buffer::list> traces; private: - set<mds_rank_t> bystanders; + std::set<mds_rank_t> bystanders; bool b_did_assim = false; public: dirfrag_t get_dirfrag() const { return dirfrag; } - const list<dirfrag_t>& get_bounds() const { return bounds; } - const set<mds_rank_t> &get_bystanders() const { return bystanders; } + const std::list<dirfrag_t>& get_bounds() const { return bounds; } + const std::set<mds_rank_t> &get_bystanders() const { return bystanders; } bool did_assim() const { return b_did_assim; } void mark_assim() { b_did_assim = true; } @@ -53,14 +53,14 @@ protected: public: std::string_view get_type_name() const override { return "ExP"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "export_prep(" << dirfrag << ")"; } void add_bound(dirfrag_t df) { bounds.push_back( df ); } - void add_trace(bufferlist& bl) { + void add_trace(ceph::buffer::list& bl) { traces.push_back(bl); } void add_bystander(mds_rank_t who) { diff --git a/src/messages/MExportDirPrepAck.h b/src/messages/MExportDirPrepAck.h index 1792185e95b..e4f036e6898 100644 --- a/src/messages/MExportDirPrepAck.h +++ b/src/messages/MExportDirPrepAck.h @@ -41,7 +41,7 @@ protected: public: bool is_success() const { return success; } std::string_view get_type_name() const override { return "ExPAck"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "export_prep_ack(" << dirfrag << (success ? " success)" : " fail)"); } diff --git a/src/messages/MFSMap.h b/src/messages/MFSMap.h index 8f77a41f8cb..c9188dc9476 100644 --- a/src/messages/MFSMap.h +++ b/src/messages/MFSMap.h @@ -23,7 +23,7 @@ class MFSMap : public Message { public: epoch_t epoch; - bufferlist encoded; + ceph::buffer::list encoded; version_t get_epoch() const { return epoch; } const FSMap& get_fsmap() const {return fsmap;} @@ -42,12 +42,13 @@ private: public: std::string_view get_type_name() const override { return "fsmap"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "fsmap(e " << epoch << ")"; } // marshalling void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(epoch, p); decode(fsmap, p); diff --git a/src/messages/MFSMapUser.h b/src/messages/MFSMapUser.h index 3b9cc34f832..bce361b222f 100644 --- a/src/messages/MFSMapUser.h +++ b/src/messages/MFSMapUser.h @@ -40,12 +40,13 @@ private: public: std::string_view get_type_name() const override { return "fsmap.user"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "fsmap.user(e " << epoch << ")"; } // marshalling void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(epoch, p); decode(fsmap, p); diff --git a/src/messages/MForward.h b/src/messages/MForward.h index ac6aeba04f8..85193e3cae3 100644 --- a/src/messages/MForward.h +++ b/src/messages/MForward.h @@ -35,8 +35,8 @@ public: EntityName entity_name; PaxosServiceMessage *msg; // incoming or outgoing message - string msg_desc; // for operator<< only - + std::string msg_desc; // for operator<< only + static constexpr int HEAD_VERSION = 4; static constexpr int COMPAT_VERSION = 4; @@ -109,6 +109,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(tid, p); if (header.version < 4) { @@ -138,7 +139,7 @@ public: } std::string_view get_type_name() const override { return "forward"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "forward("; if (msg) { o << *msg; diff --git a/src/messages/MGatherCaps.h b/src/messages/MGatherCaps.h index e4f981d6b86..e1dbcba8c46 100644 --- a/src/messages/MGatherCaps.h +++ b/src/messages/MGatherCaps.h @@ -18,7 +18,7 @@ protected: public: std::string_view get_type_name() const override { return "gather_caps"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "gather_caps(" << ino << ")"; } diff --git a/src/messages/MHeartbeat.h b/src/messages/MHeartbeat.h index 0070fa39ecc..a4d3d3baa8b 100644 --- a/src/messages/MHeartbeat.h +++ b/src/messages/MHeartbeat.h @@ -23,15 +23,15 @@ class MHeartbeat : public Message { private: mds_load_t load; - __s32 beat = 0; - map<mds_rank_t, float> import_map; + __s32 beat = 0; + std::map<mds_rank_t, float> import_map; public: const mds_load_t& get_load() const { return load; } int get_beat() const { return beat; } - const map<mds_rank_t, float>& get_import_map() const { return import_map; } - map<mds_rank_t, float>& get_import_map() { return import_map; } + const std::map<mds_rank_t, float>& get_import_map() const { return import_map; } + std::map<mds_rank_t, float>& get_import_map() { return import_map; } protected: MHeartbeat() : Message(MSG_MDS_HEARTBEAT), load(DecayRate()) {} @@ -52,6 +52,7 @@ public: encode(import_map, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(load, p); decode(beat, p); diff --git a/src/messages/MInodeFileCaps.h b/src/messages/MInodeFileCaps.h index 506594d34ae..bd96489ac7d 100644 --- a/src/messages/MInodeFileCaps.h +++ b/src/messages/MInodeFileCaps.h @@ -40,7 +40,7 @@ protected: public: std::string_view get_type_name() const override { return "inode_file_caps";} - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "inode_file_caps(" << ino << " " << ccap_string(caps) << ")"; } diff --git a/src/messages/MLock.h b/src/messages/MLock.h index 76a57feaa84..e1ac38ba951 100644 --- a/src/messages/MLock.h +++ b/src/messages/MLock.h @@ -32,11 +32,11 @@ private: __u16 lock_type = 0; // lock object type MDSCacheObjectInfo object_info; - bufferlist lockdata; // and possibly some data + ceph::buffer::list lockdata; // and possibly some data public: - bufferlist& get_data() { return lockdata; } - const bufferlist& get_data() const { return lockdata; } + ceph::buffer::list& get_data() { return lockdata; } + const ceph::buffer::list& get_data() const { return lockdata; } int get_asker() const { return asker; } int get_action() const { return action; } metareqid_t get_reqid() const { return reqid; } @@ -57,7 +57,7 @@ protected: lock_type(lock->get_type()) { lock->get_parent()->set_object_info(object_info); } - MLock(SimpleLock *lock, int ac, mds_rank_t as, bufferlist& bl) : + MLock(SimpleLock *lock, int ac, mds_rank_t as, ceph::buffer::list& bl) : SafeMessage{MSG_MDS_LOCK, HEAD_VERSION, COMPAT_VERSION}, action(ac), asker(as), lock_type(lock->get_type()) { lock->get_parent()->set_object_info(object_info); @@ -67,7 +67,7 @@ protected: public: std::string_view get_type_name() const override { return "ILock"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "lock(a=" << SimpleLock::get_lock_action_name(action) << " " << SimpleLock::get_lock_type_name(lock_type) << " " << object_info @@ -75,7 +75,7 @@ public: } void set_reqid(metareqid_t ri) { reqid = ri; } - void set_data(const bufferlist& lockdata) { + void set_data(const ceph::buffer::list& lockdata) { this->lockdata = lockdata; } diff --git a/src/messages/MLog.h b/src/messages/MLog.h index 091a7ed2392..68ea8ec4765 100644 --- a/src/messages/MLog.h +++ b/src/messages/MLog.h @@ -24,7 +24,7 @@ class MLog : public PaxosServiceMessage { public: uuid_d fsid; std::deque<LogEntry> entries; - + MLog() : PaxosServiceMessage{MSG_LOG, 0} {} MLog(const uuid_d& f, std::deque<LogEntry>&& e) : PaxosServiceMessage{MSG_LOG, 0}, fsid(f), entries{std::move(e)} { } @@ -34,7 +34,7 @@ private: public: std::string_view get_type_name() const override { return "log"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "log("; if (entries.size()) out << entries.size() << " entries from seq " << entries.front().seq @@ -49,6 +49,7 @@ public: encode(entries, payload, features); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); paxos_decode(p); decode(fsid, p); diff --git a/src/messages/MMDSBeacon.h b/src/messages/MMDSBeacon.h index f54484128b5..03c7c802472 100644 --- a/src/messages/MMDSBeacon.h +++ b/src/messages/MMDSBeacon.h @@ -119,7 +119,7 @@ struct MDSHealthMetric std::string message; std::map<std::string, std::string> metadata; - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { ENCODE_START(1, 1, bl); ceph_assert(type != MDS_HEALTH_NULL); encode((uint16_t)type, bl); @@ -129,7 +129,7 @@ struct MDSHealthMetric ENCODE_FINISH(bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { DECODE_START(1, bl); decode((uint16_t&)type, bl); ceph_assert(type != MDS_HEALTH_NULL); @@ -159,13 +159,13 @@ struct MDSHealth { std::vector<MDSHealthMetric> metrics; - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { ENCODE_START(1, 1, bl); encode(metrics, bl); ENCODE_FINISH(bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { DECODE_START(1, bl); decode(metrics, bl); DECODE_FINISH(bl); @@ -187,7 +187,7 @@ private: uuid_d fsid; mds_gid_t global_id = MDS_GID_NONE; - string name; + std::string name; MDSMap::DaemonState state = MDSMap::STATE_NULL; version_t seq = 0; @@ -196,18 +196,19 @@ private: MDSHealth health; - map<string, string> sys_info; + std::map<std::string, std::string> sys_info; uint64_t mds_features = 0; - string fs; + std::string fs; protected: MMDSBeacon() : PaxosServiceMessage(MSG_MDS_BEACON, 0, HEAD_VERSION, COMPAT_VERSION) { set_priority(CEPH_MSG_PRIO_HIGH); } - MMDSBeacon(const uuid_d &f, mds_gid_t g, const string& n, epoch_t les, MDSMap::DaemonState st, version_t se, uint64_t feat) : + MMDSBeacon(const uuid_d &f, mds_gid_t g, const std::string& n, epoch_t les, + MDSMap::DaemonState st, version_t se, uint64_t feat) : PaxosServiceMessage(MSG_MDS_BEACON, les, HEAD_VERSION, COMPAT_VERSION), fsid(f), global_id(g), name(n), state(st), seq(se), mds_features(feat) { @@ -218,7 +219,7 @@ protected: public: const uuid_d& get_fsid() const { return fsid; } mds_gid_t get_global_id() const { return global_id; } - const string& get_name() const { return name; } + const std::string& get_name() const { return name; } epoch_t get_last_epoch_seen() const { return version; } MDSMap::DaemonState get_state() const { return state; } version_t get_seq() const { return seq; } @@ -231,13 +232,13 @@ public: MDSHealth const& get_health() const { return health; } void set_health(const MDSHealth &h) { health = h; } - const string& get_fs() const { return fs; } + const std::string& get_fs() const { return fs; } void set_fs(std::string_view s) { fs = s; } - const map<string, string>& get_sys_info() const { return sys_info; } - void set_sys_info(const map<string, string>& i) { sys_info = i; } + const std::map<std::string, std::string>& get_sys_info() const { return sys_info; } + void set_sys_info(const std::map<std::string, std::string>& i) { sys_info = i; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "mdsbeacon(" << global_id << "/" << name << " " << ceph_mds_state_name(state); if (fs.size()) { diff --git a/src/messages/MMDSCacheRejoin.h b/src/messages/MMDSCacheRejoin.h index 8a8f35a886d..fba8faf3b71 100644 --- a/src/messages/MMDSCacheRejoin.h +++ b/src/messages/MMDSCacheRejoin.h @@ -50,7 +50,7 @@ public: inode_strong(int n, int cw, int dl, int nl, int dftl) : nonce(n), caps_wanted(cw), filelock(dl), nestlock(nl), dftlock(dftl) { } - void encode(bufferlist &bl) const { + void encode(ceph::buffer::list &bl) const { using ceph::encode; encode(nonce, bl); encode(caps_wanted, bl); @@ -58,7 +58,7 @@ public: encode(nestlock, bl); encode(dftlock, bl); } - void decode(bufferlist::const_iterator &bl) { + void decode(ceph::buffer::list::const_iterator &bl) { using ceph::decode; decode(nonce, bl); decode(caps_wanted, bl); @@ -74,12 +74,12 @@ public: int8_t dir_rep = 0; dirfrag_strong() {} dirfrag_strong(int n, int dr) : nonce(n), dir_rep(dr) {} - void encode(bufferlist &bl) const { + void encode(ceph::buffer::list &bl) const { using ceph::encode; encode(nonce, bl); encode(dir_rep, bl); } - void decode(bufferlist::const_iterator &bl) { + void decode(ceph::buffer::list::const_iterator &bl) { using ceph::decode; decode(nonce, bl); decode(dir_rep, bl); @@ -101,7 +101,7 @@ public: bool is_primary() const { return ino > 0; } bool is_remote() const { return remote_ino > 0; } bool is_null() const { return ino == 0 && remote_ino == 0; } - void encode(bufferlist &bl) const { + void encode(ceph::buffer::list &bl) const { using ceph::encode; encode(first, bl); encode(ino, bl); @@ -110,7 +110,7 @@ public: encode(nonce, bl); encode(lock, bl); } - void decode(bufferlist::const_iterator &bl) { + void decode(ceph::buffer::list::const_iterator &bl) { using ceph::decode; decode(first, bl); decode(ino, bl); @@ -127,12 +127,12 @@ public: inodeno_t ino; dn_weak() : ino(0) {} dn_weak(snapid_t f, inodeno_t pi) : first(f), ino(pi) {} - void encode(bufferlist &bl) const { + void encode(ceph::buffer::list &bl) const { using ceph::encode; encode(first, bl); encode(ino, bl); } - void decode(bufferlist::const_iterator &bl) { + void decode(ceph::buffer::list::const_iterator &bl) { using ceph::decode; decode(first, bl); decode(ino, bl); @@ -141,14 +141,14 @@ public: WRITE_CLASS_ENCODER(dn_weak) struct lock_bls { - bufferlist file, nest, dft; - void encode(bufferlist& bl) const { + ceph::buffer::list file, nest, dft; + void encode(ceph::buffer::list& bl) const { using ceph::encode; encode(file, bl); encode(nest, bl); encode(dft, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; decode(file, bl); decode(nest, bl); @@ -164,12 +164,12 @@ public: slave_reqid() : attempt(0) {} slave_reqid(const metareqid_t& r, __u32 a) : reqid(r), attempt(a) {} - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; encode(reqid, bl); encode(attempt, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; decode(reqid, bl); decode(attempt, bl); @@ -177,7 +177,7 @@ public: }; std::string_view get_type_name() const override { return "cache_rejoin"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "cache_rejoin " << get_opname(op); } @@ -189,7 +189,7 @@ public: void add_strong_inode(vinodeno_t i, int n, int cw, int dl, int nl, int dftl) { strong_inodes[i] = inode_strong(n, cw, dl, nl, dftl); } - void add_inode_locks(CInode *in, __u32 nonce, bufferlist& bl) { + void add_inode_locks(CInode *in, __u32 nonce, ceph::buffer::list& bl) { using ceph::encode; encode(in->inode.ino, inode_locks); encode(in->last, inode_locks); @@ -200,7 +200,7 @@ public: using ceph::encode; encode(in->inode.ino, inode_base); encode(in->last, inode_base); - bufferlist bl; + ceph::buffer::list bl; in->_encode_base(bl, features); encode(bl, inode_base); } @@ -230,7 +230,7 @@ public: strong_dirfrags[df] = dirfrag_strong(n, dr); } void add_dirfrag_base(CDir *dir) { - bufferlist& bl = dirfrag_bases[dir->dirfrag()]; + ceph::buffer::list& bl = dirfrag_bases[dir->dirfrag()]; dir->_encode_base(bl); } @@ -312,33 +312,33 @@ public: int32_t op = 0; // weak - map<inodeno_t, map<string_snap_t, dn_weak> > weak; - set<dirfrag_t> weak_dirfrags; - set<vinodeno_t> weak_inodes; - map<inodeno_t, lock_bls> inode_scatterlocks; + std::map<inodeno_t, std::map<string_snap_t, dn_weak> > weak; + std::set<dirfrag_t> weak_dirfrags; + std::set<vinodeno_t> weak_inodes; + std::map<inodeno_t, lock_bls> inode_scatterlocks; // strong - map<dirfrag_t, dirfrag_strong> strong_dirfrags; - map<dirfrag_t, map<string_snap_t, dn_strong> > strong_dentries; - map<vinodeno_t, inode_strong> strong_inodes; + std::map<dirfrag_t, dirfrag_strong> strong_dirfrags; + std::map<dirfrag_t, std::map<string_snap_t, dn_strong> > strong_dentries; + std::map<vinodeno_t, inode_strong> strong_inodes; // open - map<inodeno_t,map<client_t, cap_reconnect_t> > cap_exports; - map<client_t, entity_inst_t> client_map; - map<client_t,client_metadata_t> client_metadata_map; - bufferlist imported_caps; + std::map<inodeno_t,std::map<client_t, cap_reconnect_t> > cap_exports; + std::map<client_t, entity_inst_t> client_map; + std::map<client_t,client_metadata_t> client_metadata_map; + ceph::buffer::list imported_caps; // full - bufferlist inode_base; - bufferlist inode_locks; - map<dirfrag_t, bufferlist> dirfrag_bases; + ceph::buffer::list inode_base; + ceph::buffer::list inode_locks; + std::map<dirfrag_t, ceph::buffer::list> dirfrag_bases; - map<vinodeno_t, list<slave_reqid> > authpinned_inodes; - map<vinodeno_t, slave_reqid> frozen_authpin_inodes; - map<vinodeno_t, map<__s32, slave_reqid> > xlocked_inodes; - map<vinodeno_t, map<__s32, list<slave_reqid> > > wrlocked_inodes; - map<dirfrag_t, map<string_snap_t, list<slave_reqid> > > authpinned_dentries; - map<dirfrag_t, map<string_snap_t, slave_reqid> > xlocked_dentries; + std::map<vinodeno_t, std::list<slave_reqid> > authpinned_inodes; + std::map<vinodeno_t, slave_reqid> frozen_authpin_inodes; + std::map<vinodeno_t, std::map<__s32, slave_reqid> > xlocked_inodes; + std::map<vinodeno_t, std::map<__s32, std::list<slave_reqid> > > wrlocked_inodes; + std::map<dirfrag_t, std::map<string_snap_t, std::list<slave_reqid> > > authpinned_dentries; + std::map<dirfrag_t, std::map<string_snap_t, slave_reqid> > xlocked_dentries; private: template<class T, typename... Args> @@ -359,7 +359,7 @@ WRITE_CLASS_ENCODER(MMDSCacheRejoin::dn_weak) WRITE_CLASS_ENCODER(MMDSCacheRejoin::lock_bls) WRITE_CLASS_ENCODER(MMDSCacheRejoin::slave_reqid) -inline ostream& operator<<(ostream& out, const MMDSCacheRejoin::slave_reqid& r) { +inline std::ostream& operator<<(std::ostream& out, const MMDSCacheRejoin::slave_reqid& r) { return out << r.reqid << '.' << r.attempt; } diff --git a/src/messages/MMDSFindIno.h b/src/messages/MMDSFindIno.h index 1c14f5be7cb..6bc5e01204f 100644 --- a/src/messages/MMDSFindIno.h +++ b/src/messages/MMDSFindIno.h @@ -32,7 +32,7 @@ protected: public: std::string_view get_type_name() const override { return "findino"; } - void print(ostream &out) const override { + void print(std::ostream &out) const override { out << "findino(" << tid << " " << ino << ")"; } @@ -42,6 +42,7 @@ public: encode(ino, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(tid, p); decode(ino, p); diff --git a/src/messages/MMDSFindInoReply.h b/src/messages/MMDSFindInoReply.h index 7fe13bb5cd2..6747983ff4e 100644 --- a/src/messages/MMDSFindInoReply.h +++ b/src/messages/MMDSFindInoReply.h @@ -32,16 +32,17 @@ protected: public: std::string_view get_type_name() const override { return "findinoreply"; } - void print(ostream &out) const override { + void print(std::ostream &out) const override { out << "findinoreply(" << tid << " " << path << ")"; } - + void encode_payload(uint64_t features) override { using ceph::encode; encode(tid, payload); encode(path, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(tid, p); decode(path, p); diff --git a/src/messages/MMDSFragmentNotify.h b/src/messages/MMDSFragmentNotify.h index 9a896f1177d..cd5e2369895 100644 --- a/src/messages/MMDSFragmentNotify.h +++ b/src/messages/MMDSFragmentNotify.h @@ -34,7 +34,7 @@ private: bool is_ack_wanted() const { return ack_wanted; } void mark_ack_wanted() { ack_wanted = true; } - bufferlist basebl; + ceph::buffer::list basebl; protected: MMDSFragmentNotify() : @@ -46,9 +46,9 @@ protected: } ~MMDSFragmentNotify() override {} -public: +public: std::string_view get_type_name() const override { return "fragment_notify"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "fragment_notify(" << base_dirfrag << " " << (int)bits << ")"; } @@ -60,6 +60,7 @@ public: encode(ack_wanted, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(base_dirfrag, p); decode(bits, p); diff --git a/src/messages/MMDSFragmentNotifyAck.h b/src/messages/MMDSFragmentNotifyAck.h index e78a0f2df26..197f965a014 100644 --- a/src/messages/MMDSFragmentNotifyAck.h +++ b/src/messages/MMDSFragmentNotifyAck.h @@ -26,7 +26,7 @@ private: dirfrag_t get_base_dirfrag() const { return base_dirfrag; } int get_bits() const { return bits; } - bufferlist basebl; + ceph::buffer::list basebl; protected: MMDSFragmentNotifyAck() : SafeMessage{MSG_MDS_FRAGMENTNOTIFYACK} {} @@ -39,7 +39,7 @@ protected: public: std::string_view get_type_name() const override { return "fragment_notify_ack"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "fragment_notify_ack(" << base_dirfrag << " " << (int)bits << ")"; } @@ -49,6 +49,7 @@ public: encode(bits, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(base_dirfrag, p); decode(bits, p); diff --git a/src/messages/MMDSLoadTargets.h b/src/messages/MMDSLoadTargets.h index eb9edf21459..96e94006073 100644 --- a/src/messages/MMDSLoadTargets.h +++ b/src/messages/MMDSLoadTargets.h @@ -26,18 +26,18 @@ using std::map; class MMDSLoadTargets : public PaxosServiceMessage { public: mds_gid_t global_id; - set<mds_rank_t> targets; + std::set<mds_rank_t> targets; protected: MMDSLoadTargets() : PaxosServiceMessage(MSG_MDS_OFFLOAD_TARGETS, 0) {} - MMDSLoadTargets(mds_gid_t g, set<mds_rank_t>& mds_targets) : + MMDSLoadTargets(mds_gid_t g, std::set<mds_rank_t>& mds_targets) : PaxosServiceMessage(MSG_MDS_OFFLOAD_TARGETS, 0), global_id(g), targets(mds_targets) {} ~MMDSLoadTargets() override {} public: std::string_view get_type_name() const override { return "mds_load_targets"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "mds_load_targets(" << global_id << " " << targets << ")"; } diff --git a/src/messages/MMDSMap.h b/src/messages/MMDSMap.h index 31bff006629..9087df6c07c 100644 --- a/src/messages/MMDSMap.h +++ b/src/messages/MMDSMap.h @@ -27,10 +27,10 @@ private: public: uuid_d fsid; epoch_t epoch = 0; - bufferlist encoded; + ceph::buffer::list encoded; version_t get_epoch() const { return epoch; } - const bufferlist& get_encoded() const { return encoded; } + const ceph::buffer::list& get_encoded() const { return encoded; } protected: MMDSMap() : @@ -45,12 +45,13 @@ protected: public: std::string_view get_type_name() const override { return "mdsmap"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "mdsmap(e " << epoch << ")"; } // marshalling void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(fsid, p); decode(epoch, p); diff --git a/src/messages/MMDSOpenIno.h b/src/messages/MMDSOpenIno.h index e37f070eb5d..e49a27429dd 100644 --- a/src/messages/MMDSOpenIno.h +++ b/src/messages/MMDSOpenIno.h @@ -22,11 +22,11 @@ class MMDSOpenIno : public SafeMessage { static const int COMPAT_VERSION = 1; public: inodeno_t ino; - vector<inode_backpointer_t> ancestors; + std::vector<inode_backpointer_t> ancestors; protected: MMDSOpenIno() : SafeMessage{MSG_MDS_OPENINO, HEAD_VERSION, COMPAT_VERSION} {} - MMDSOpenIno(ceph_tid_t t, inodeno_t i, vector<inode_backpointer_t>* pa) : + MMDSOpenIno(ceph_tid_t t, inodeno_t i, std::vector<inode_backpointer_t>* pa) : SafeMessage{MSG_MDS_OPENINO, HEAD_VERSION, COMPAT_VERSION}, ino(i) { header.tid = t; if (pa) @@ -36,7 +36,7 @@ protected: public: std::string_view get_type_name() const override { return "openino"; } - void print(ostream &out) const override { + void print(std::ostream &out) const override { out << "openino(" << header.tid << " " << ino << " " << ancestors << ")"; } @@ -46,6 +46,7 @@ public: encode(ancestors, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(ino, p); decode(ancestors, p); diff --git a/src/messages/MMDSOpenInoReply.h b/src/messages/MMDSOpenInoReply.h index 37eae828525..5821260d348 100644 --- a/src/messages/MMDSOpenInoReply.h +++ b/src/messages/MMDSOpenInoReply.h @@ -22,7 +22,7 @@ public: static const int HEAD_VERSION = 1; static const int COMPAT_VERSION = 1; inodeno_t ino; - vector<inode_backpointer_t> ancestors; + std::vector<inode_backpointer_t> ancestors; mds_rank_t hint; int32_t error; @@ -36,7 +36,7 @@ protected: public: std::string_view get_type_name() const override { return "openinoreply"; } - void print(ostream &out) const override { + void print(std::ostream &out) const override { out << "openinoreply(" << header.tid << " " << ino << " " << hint << " " << ancestors << ")"; } @@ -49,6 +49,7 @@ public: encode(error, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(ino, p); decode(ancestors, p); diff --git a/src/messages/MMDSResolve.h b/src/messages/MMDSResolve.h index ec03c22922c..c303b241a7a 100644 --- a/src/messages/MMDSResolve.h +++ b/src/messages/MMDSResolve.h @@ -26,23 +26,23 @@ class MMDSResolve : public SafeMessage { static const int COMPAT_VERSION = 1; public: - map<dirfrag_t, vector<dirfrag_t> > subtrees; - map<dirfrag_t, vector<dirfrag_t> > ambiguous_imports; + std::map<dirfrag_t, std::vector<dirfrag_t>> subtrees; + std::map<dirfrag_t, std::vector<dirfrag_t>> ambiguous_imports; class slave_inode_cap { public: inodeno_t ino; - map<client_t,Capability::Export> cap_exports; + std::map<client_t,Capability::Export> cap_exports; slave_inode_cap() {} slave_inode_cap(inodeno_t a, map<client_t, Capability::Export> b) : ino(a), cap_exports(b) {} - void encode(bufferlist &bl) const + void encode(ceph::buffer::list &bl) const { ENCODE_START(1, 1, bl); encode(ino, bl); encode(cap_exports, bl); ENCODE_FINISH(bl); } - void decode(bufferlist::const_iterator &blp) + void decode(ceph::buffer::list::const_iterator &blp) { DECODE_START(1, blp); decode(ino, blp); @@ -53,16 +53,16 @@ public: WRITE_CLASS_ENCODER(slave_inode_cap) struct slave_request { - bufferlist inode_caps; + ceph::buffer::list inode_caps; bool committing; slave_request() : committing(false) {} - void encode(bufferlist &bl) const { + void encode(ceph::buffer::list &bl) const { ENCODE_START(1, 1, bl); encode(inode_caps, bl); encode(committing, bl); ENCODE_FINISH(bl); } - void decode(bufferlist::const_iterator &blp) { + void decode(ceph::buffer::list::const_iterator &blp) { DECODE_START(1, blp); decode(inode_caps, blp); decode(committing, blp); @@ -70,30 +70,30 @@ public: } }; - map<metareqid_t, slave_request> slave_requests; + std::map<metareqid_t, slave_request> slave_requests; // table client information struct table_client { __u8 type; - set<version_t> pending_commits; + std::set<version_t> pending_commits; table_client() : type(0) {} - table_client(int _type, const set<version_t>& commits) + table_client(int _type, const std::set<version_t>& commits) : type(_type), pending_commits(commits) {} - void encode(bufferlist& bl) const { + void encode(ceph::buffer::list& bl) const { using ceph::encode; encode(type, bl); encode(pending_commits, bl); } - void decode(bufferlist::const_iterator& bl) { + void decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; decode(type, bl); decode(pending_commits, bl); } }; - list<table_client> table_clients; + std::list<table_client> table_clients; protected: MMDSResolve() : SafeMessage{MSG_MDS_RESOLVE, HEAD_VERSION, COMPAT_VERSION} @@ -103,7 +103,7 @@ protected: public: std::string_view get_type_name() const override { return "mds_resolve"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "mds_resolve(" << subtrees.size() << "+" << ambiguous_imports.size() << " subtrees +" << slave_requests.size() << " slave requests)"; @@ -116,7 +116,7 @@ public: subtrees[im].push_back(ex); } - void add_ambiguous_import(dirfrag_t im, const vector<dirfrag_t>& m) { + void add_ambiguous_import(dirfrag_t im, const std::vector<dirfrag_t>& m) { ambiguous_imports[im] = m; } @@ -124,11 +124,11 @@ public: slave_requests[reqid].committing = committing; } - void add_slave_request(metareqid_t reqid, bufferlist& bl) { + void add_slave_request(metareqid_t reqid, ceph::buffer::list& bl) { slave_requests[reqid].inode_caps.claim(bl); } - void add_table_commits(int table, const set<version_t>& pending_commits) { + void add_table_commits(int table, const std::set<version_t>& pending_commits) { table_clients.push_back(table_client(table, pending_commits)); } @@ -152,7 +152,7 @@ private: friend boost::intrusive_ptr<T> ceph::make_message(Args&&... args); }; -inline ostream& operator<<(ostream& out, const MMDSResolve::slave_request&) { +inline std::ostream& operator<<(std::ostream& out, const MMDSResolve::slave_request&) { return out; } diff --git a/src/messages/MMDSResolveAck.h b/src/messages/MMDSResolveAck.h index 76599d0944f..5e1e4907709 100644 --- a/src/messages/MMDSResolveAck.h +++ b/src/messages/MMDSResolveAck.h @@ -24,8 +24,8 @@ class MMDSResolveAck : public SafeMessage { static const int HEAD_VERSION = 1; static const int COMPAT_VERSION = 1; public: - map<metareqid_t, bufferlist> commit; - vector<metareqid_t> abort; + std::map<metareqid_t, ceph::buffer::list> commit; + std::vector<metareqid_t> abort; protected: MMDSResolveAck() : SafeMessage{MSG_MDS_RESOLVEACK, HEAD_VERSION, COMPAT_VERSION} {} diff --git a/src/messages/MMDSSlaveRequest.h b/src/messages/MMDSSlaveRequest.h index d5ee1a20737..e1aa30aea77 100644 --- a/src/messages/MMDSSlaveRequest.h +++ b/src/messages/MMDSSlaveRequest.h @@ -112,21 +112,21 @@ public: MDSCacheObjectInfo object_info; // for authpins - vector<MDSCacheObjectInfo> authpins; + std::vector<MDSCacheObjectInfo> authpins; public: // for rename prep filepath srcdnpath; filepath destdnpath; - set<mds_rank_t> witnesses; - bufferlist inode_export; + std::set<mds_rank_t> witnesses; + ceph::buffer::list inode_export; version_t inode_export_v; mds_rank_t srcdn_auth; utime_t op_stamp; - mutable bufferlist straybl; // stray dir + dentry - bufferlist srci_snapbl; - bufferlist desti_snapbl; + mutable ceph::buffer::list straybl; // stray dir + dentry + ceph::buffer::list srci_snapbl; + ceph::buffer::list desti_snapbl; public: metareqid_t get_reqid() const { return reqid; } @@ -140,8 +140,8 @@ public: const MDSCacheObjectInfo &get_authpin_freeze() const { return object_info; } MDSCacheObjectInfo &get_authpin_freeze() { return object_info; } - const vector<MDSCacheObjectInfo>& get_authpins() const { return authpins; } - vector<MDSCacheObjectInfo>& get_authpins() { return authpins; } + const std::vector<MDSCacheObjectInfo>& get_authpins() const { return authpins; } + std::vector<MDSCacheObjectInfo>& get_authpins() { return authpins; } void mark_nonblocking() { flags |= FLAG_NONBLOCKING; } bool is_nonblocking() const { return (flags & FLAG_NONBLOCKING); } void mark_error_wouldblock() { flags |= FLAG_WOULDBLOCK; } @@ -161,8 +161,8 @@ public: void mark_req_blocked() { flags |= FLAG_REQBLOCKED; } void set_lock_type(int t) { lock_type = t; } - const bufferlist& get_lock_data() const { return inode_export; } - bufferlist& get_lock_data() { return inode_export; } + const ceph::buffer::list& get_lock_data() const { return inode_export; } + ceph::buffer::list& get_lock_data() { return inode_export; } protected: MMDSSlaveRequest() : SafeMessage{MSG_MDS_SLAVE_REQUEST, HEAD_VERSION, COMPAT_VERSION} { } @@ -194,6 +194,7 @@ public: encode(desti_snapbl, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(reqid, p); decode(attempt, p); @@ -215,7 +216,7 @@ public: } std::string_view get_type_name() const override { return "slave_request"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "slave_request(" << reqid << "." << attempt << " " << get_opname(op) diff --git a/src/messages/MMDSSnapUpdate.h b/src/messages/MMDSSnapUpdate.h index 13847498ace..2fed73a34af 100644 --- a/src/messages/MMDSSnapUpdate.h +++ b/src/messages/MMDSSnapUpdate.h @@ -26,7 +26,7 @@ public: inodeno_t get_ino() const { return ino; } int get_snap_op() const { return snap_op; } - bufferlist snap_blob; + ceph::buffer::list snap_blob; protected: MMDSSnapUpdate() : SafeMessage{MSG_MDS_SNAPUPDATE} {} @@ -38,7 +38,7 @@ protected: public: std::string_view get_type_name() const override { return "snap_update"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "snap_update(" << ino << " table_tid " << get_tid() << ")"; } diff --git a/src/messages/MMDSTableRequest.h b/src/messages/MMDSTableRequest.h index 01254d0bbb0..8c168950961 100644 --- a/src/messages/MMDSTableRequest.h +++ b/src/messages/MMDSTableRequest.h @@ -24,7 +24,7 @@ public: __u16 table = 0; __s16 op = 0; uint64_t reqid = 0; - bufferlist bl; + ceph::buffer::list bl; protected: MMDSTableRequest() : SafeMessage{MSG_MDS_TABLE_REQUEST} {} @@ -35,9 +35,9 @@ protected: } ~MMDSTableRequest() override {} -public: +public: std::string_view get_type_name() const override { return "mds_table_request"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "mds_table_request(" << get_mdstable_name(table) << " " << get_mdstableserver_opname(op); if (reqid) o << " " << reqid; @@ -47,6 +47,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(table, p); decode(op, p); diff --git a/src/messages/MMgrBeacon.h b/src/messages/MMgrBeacon.h index a3598922193..dd3e3e1dcf6 100644 --- a/src/messages/MMgrBeacon.h +++ b/src/messages/MMgrBeacon.h @@ -43,7 +43,7 @@ protected: // Information about the modules found locally on this daemon std::vector<MgrMap::ModuleInfo> modules; - map<string,string> metadata; ///< misc metadata about this osd + std::map<std::string,std::string> metadata; ///< misc metadata about this osd std::vector<entity_addrvec_t> clients; @@ -58,7 +58,7 @@ public: MMgrBeacon(const uuid_d& fsid_, uint64_t gid_, const std::string &name_, entity_addrvec_t server_addrs_, bool available_, std::vector<MgrMap::ModuleInfo>&& modules_, - map<string,string>&& metadata_, + std::map<std::string,std::string>&& metadata_, std::vector<entity_addrvec_t> clients, uint64_t feat) : PaxosServiceMessage{MSG_MGR_BEACON, 0, HEAD_VERSION, COMPAT_VERSION}, @@ -114,7 +114,7 @@ public: std::string_view get_type_name() const override { return "mgrbeacon"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << get_type_name() << " mgr." << name << "(" << fsid << "," << gid << ", " << server_addrs << ", " << available << ")"; @@ -155,6 +155,7 @@ public: encode(clients, payload, features); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); paxos_decode(p); decode(server_addrs, p); // entity_addr_t for version < 8 diff --git a/src/messages/MMgrDigest.h b/src/messages/MMgrDigest.h index 00e237b4c33..a97a5a32bc9 100644 --- a/src/messages/MMgrDigest.h +++ b/src/messages/MMgrDigest.h @@ -24,15 +24,16 @@ */ class MMgrDigest : public Message { public: - bufferlist mon_status_json; - bufferlist health_json; + ceph::buffer::list mon_status_json; + ceph::buffer::list health_json; std::string_view get_type_name() const override { return "mgrdigest"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << get_type_name(); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(mon_status_json, p); decode(health_json, p); diff --git a/src/messages/MMonElection.h b/src/messages/MMonElection.h index 84240c6d6de..bc5b387ea9f 100644 --- a/src/messages/MMonElection.h +++ b/src/messages/MMonElection.h @@ -40,18 +40,18 @@ public: default: ceph_abort(); return 0; } } - + uuid_d fsid; int32_t op; epoch_t epoch; - bufferlist monmap_bl; - set<int32_t> quorum; + ceph::buffer::list monmap_bl; + std::set<int32_t> quorum; uint64_t quorum_features; mon_feature_t mon_features; ceph_release_t mon_release{ceph_release_t::unknown}; - bufferlist sharing_bl; - map<string,string> metadata; - + ceph::buffer::list sharing_bl; + std::map<std::string,std::string> metadata; + MMonElection() : Message{MSG_MON_ELECTION, HEAD_VERSION, COMPAT_VERSION}, op(0), epoch(0), quorum_features(0), @@ -71,13 +71,13 @@ public: private: ~MMonElection() override {} -public: +public: std::string_view get_type_name() const override { return "election"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "election(" << fsid << " " << get_opname(op) << " rel " << (int)mon_release << " e" << epoch << ")"; } - + void encode_payload(uint64_t features) override { using ceph::encode; if (monmap_bl.length() && (features != CEPH_FEATURES_ALL)) { @@ -102,6 +102,7 @@ public: encode(mon_release, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(fsid, p); decode(op, p); diff --git a/src/messages/MMonGetPurgedSnapsReply.h b/src/messages/MMonGetPurgedSnapsReply.h index 5d7628e35d5..f8a8a4530ea 100644 --- a/src/messages/MMonGetPurgedSnapsReply.h +++ b/src/messages/MMonGetPurgedSnapsReply.h @@ -10,7 +10,7 @@ class MMonGetPurgedSnapsReply : public PaxosServiceMessage { public: epoch_t start, last; - map<epoch_t,mempool::osdmap::map<int64_t,snap_interval_set_t>> purged_snaps; + std::map<epoch_t,mempool::osdmap::map<int64_t,snap_interval_set_t>> purged_snaps; MMonGetPurgedSnapsReply(epoch_t s=0, epoch_t l=0) : PaxosServiceMessage{MSG_MON_GET_PURGED_SNAPS_REPLY, 0}, diff --git a/src/messages/MMonGlobalID.h b/src/messages/MMonGlobalID.h index dde000e7947..2973dec72b4 100644 --- a/src/messages/MMonGlobalID.h +++ b/src/messages/MMonGlobalID.h @@ -27,11 +27,12 @@ private: public: std::string_view get_type_name() const override { return "global_id"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "global_id (" << old_max_id << ")"; } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); paxos_decode(p); decode(old_max_id, p); diff --git a/src/messages/MMonHealth.h b/src/messages/MMonHealth.h index 1d4fd73174c..77923f95e90 100644 --- a/src/messages/MMonHealth.h +++ b/src/messages/MMonHealth.h @@ -35,7 +35,7 @@ private: public: std::string_view get_type_name() const override { return "mon_health"; } - void print(ostream &o) const override { + void print(std::ostream &o) const override { o << "mon_health(" << " e " << get_epoch() << " r " << get_round() @@ -43,6 +43,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); service_decode(p); decode(service_type, p); diff --git a/src/messages/MMonHealthChecks.h b/src/messages/MMonHealthChecks.h index 86a4fa0c920..285163d2f27 100644 --- a/src/messages/MMonHealthChecks.h +++ b/src/messages/MMonHealthChecks.h @@ -27,11 +27,12 @@ private: public: std::string_view get_type_name() const override { return "mon_health_checks"; } - void print(ostream &o) const override { + void print(std::ostream &o) const override { o << "mon_health_checks(" << health_checks.checks.size() << " checks)"; } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); paxos_decode(p); decode(health_checks, p); diff --git a/src/messages/MMonJoin.h b/src/messages/MMonJoin.h index c5aaa9e7f04..b0649025305 100644 --- a/src/messages/MMonJoin.h +++ b/src/messages/MMonJoin.h @@ -17,20 +17,17 @@ #include "messages/PaxosServiceMessage.h" -#include <vector> -using std::vector; - class MMonJoin : public PaxosServiceMessage { public: static constexpr int HEAD_VERSION = 2; static constexpr int COMPAT_VERSION = 2; uuid_d fsid; - string name; + std::string name; entity_addrvec_t addrs; MMonJoin() : PaxosServiceMessage{MSG_MON_JOIN, 0, HEAD_VERSION, COMPAT_VERSION} {} - MMonJoin(uuid_d &f, string n, const entity_addrvec_t& av) + MMonJoin(uuid_d &f, std::string n, const entity_addrvec_t& av) : PaxosServiceMessage{MSG_MON_JOIN, 0, HEAD_VERSION, COMPAT_VERSION}, fsid(f), name(n), addrs(av) { } @@ -38,12 +35,12 @@ public: private: ~MMonJoin() override {} -public: +public: std::string_view get_type_name() const override { return "mon_join"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { o << "mon_join(" << name << " " << addrs << ")"; } - + void encode_payload(uint64_t features) override { using ceph::encode; paxos_encode(); @@ -60,6 +57,7 @@ public: } } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); paxos_decode(p); decode(fsid, p); diff --git a/src/messages/MMonMetadata.h b/src/messages/MMonMetadata.h index 3edc3e464c2..302dcf1be6e 100644 --- a/src/messages/MMonMetadata.h +++ b/src/messages/MMonMetadata.h @@ -45,6 +45,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(data, p); } diff --git a/src/messages/MMonMgrReport.h b/src/messages/MMonMgrReport.h index f695b78c7af..6952363392b 100644 --- a/src/messages/MMonMgrReport.h +++ b/src/messages/MMonMgrReport.h @@ -29,7 +29,7 @@ private: public: // PGMapDigest is in data payload health_check_map_t health_checks; - bufferlist service_map_bl; // encoded ServiceMap + ceph::buffer::list service_map_bl; // encoded ServiceMap std::map<std::string,ProgressEvent> progress_events; MMonMgrReport() @@ -41,7 +41,7 @@ private: public: std::string_view get_type_name() const override { return "monmgrreport"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << get_type_name() << "(" << health_checks.checks.size() << " checks, " << progress_events.size() << " progress events)"; } @@ -65,12 +65,13 @@ public: PGMapDigest digest; auto p = data.cbegin(); decode(digest, p); - bufferlist bl; + ceph::buffer::list bl; encode(digest, bl, features); set_data(bl); } } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); paxos_decode(p); decode(health_checks, p); diff --git a/src/messages/MMonPaxos.h b/src/messages/MMonPaxos.h index 3452482c648..7bc28258a31 100644 --- a/src/messages/MMonPaxos.h +++ b/src/messages/MMonPaxos.h @@ -59,11 +59,11 @@ private: utime_t sent_timestamp; version_t latest_version = 0; - bufferlist latest_value; + ceph::buffer::list latest_value; - map<version_t,bufferlist> values; + std::map<version_t,ceph::buffer::list> values; - bufferlist feature_map; + ceph::buffer::list feature_map; MMonPaxos() : Message{MSG_MON_PAXOS, HEAD_VERSION, COMPAT_VERSION} { } MMonPaxos(epoch_t e, int o, utime_t now) : @@ -78,10 +78,10 @@ private: private: ~MMonPaxos() override {} -public: +public: std::string_view get_type_name() const override { return "paxos"; } - - void print(ostream& out) const override { + + void print(std::ostream& out) const override { out << "paxos(" << get_opname(op) << " lc " << last_committed << " fc " << first_committed @@ -109,6 +109,7 @@ public: encode(feature_map, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(epoch, p); decode(op, p); diff --git a/src/messages/MMonProbe.h b/src/messages/MMonProbe.h index 8cd8a506a77..f4a6199522e 100644 --- a/src/messages/MMonProbe.h +++ b/src/messages/MMonProbe.h @@ -49,9 +49,9 @@ public: uuid_d fsid; int32_t op = 0; - string name; - set<int32_t> quorum; - bufferlist monmap_bl; + std::string name; + std::set<int32_t> quorum; + ceph::buffer::list monmap_bl; version_t paxos_first_version = 0; version_t paxos_last_version = 0; bool has_ever_joined = 0; @@ -60,7 +60,7 @@ public: MMonProbe() : Message{MSG_MON_PROBE, HEAD_VERSION, COMPAT_VERSION} {} - MMonProbe(const uuid_d& f, int o, const string& n, bool hej, ceph_release_t mr) + MMonProbe(const uuid_d& f, int o, const std::string& n, bool hej, ceph_release_t mr) : Message{MSG_MON_PROBE, HEAD_VERSION, COMPAT_VERSION}, fsid(f), op(o), @@ -73,9 +73,9 @@ public: private: ~MMonProbe() override {} -public: +public: std::string_view get_type_name() const override { return "mon_probe"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "mon_probe(" << get_opname(op) << " " << fsid << " name " << name; if (quorum.size()) out << " quorum " << quorum; @@ -93,7 +93,7 @@ public: out << " mon_release " << mon_release; out << ")"; } - + void encode_payload(uint64_t features) override { using ceph::encode; if (monmap_bl.length() && @@ -118,6 +118,7 @@ public: encode(mon_release, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(fsid, p); decode(op, p); diff --git a/src/messages/MMonQuorumService.h b/src/messages/MMonQuorumService.h index a2cf527b5ec..062f34f2fef 100644 --- a/src/messages/MMonQuorumService.h +++ b/src/messages/MMonQuorumService.h @@ -50,7 +50,8 @@ public: encode(round, payload); } - void service_decode(bufferlist::const_iterator &p) { + void service_decode(ceph::buffer::list::const_iterator &p) { + using ceph::decode; decode(epoch, p); decode(round, p); } diff --git a/src/messages/MMonScrub.h b/src/messages/MMonScrub.h index 967588fd262..b3b99b43fd4 100644 --- a/src/messages/MMonScrub.h +++ b/src/messages/MMonScrub.h @@ -39,7 +39,7 @@ public: version_t version = 0; ScrubResult result; int32_t num_keys; - pair<string,string> key; + std::pair<std::string,std::string> key; MMonScrub() : Message{MSG_MON_SCRUB, HEAD_VERSION, COMPAT_VERSION}, @@ -53,7 +53,7 @@ public: std::string_view get_type_name() const override { return "mon_scrub"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "mon_scrub(" << get_opname((op_type_t)op); out << " v " << version; if (op == OP_RESULT) @@ -74,6 +74,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); uint8_t o; decode(o, p); diff --git a/src/messages/MMonSync.h b/src/messages/MMonSync.h index 41832366f9e..a9e6184bef3 100644 --- a/src/messages/MMonSync.h +++ b/src/messages/MMonSync.h @@ -56,8 +56,8 @@ public: uint32_t op = 0; uint64_t cookie = 0; version_t last_committed = 0; - pair<string,string> last_key; - bufferlist chunk_bl; + std::pair<std::string,std::string> last_key; + ceph::buffer::list chunk_bl; entity_inst_t reply_to; MMonSync() @@ -73,7 +73,7 @@ public: std::string_view get_type_name() const override { return "mon_sync"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "mon_sync(" << get_opname(op); if (cookie) out << " cookie " << cookie; @@ -98,6 +98,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(op, p); decode(cookie, p); diff --git a/src/messages/MOSDAlive.h b/src/messages/MOSDAlive.h index 7b82d4fd172..8a1a02b4c36 100644 --- a/src/messages/MOSDAlive.h +++ b/src/messages/MOSDAlive.h @@ -37,11 +37,12 @@ public: void decode_payload() override { auto p = payload.cbegin(); paxos_decode(p); + using ceph::decode; decode(want, p); } std::string_view get_type_name() const override { return "osd_alive"; } - void print(ostream &out) const override { + void print(std::ostream &out) const override { out << "osd_alive(want up_thru " << want << " have " << version << ")"; } private: diff --git a/src/messages/MOSDBeacon.h b/src/messages/MOSDBeacon.h index 20341858de4..493408f8e88 100644 --- a/src/messages/MOSDBeacon.h +++ b/src/messages/MOSDBeacon.h @@ -33,6 +33,7 @@ public: } void decode_payload() override { auto p = payload.cbegin(); + using ceph::decode; paxos_decode(p); decode(pgs, p); decode(min_last_epoch_clean, p); @@ -41,7 +42,7 @@ public: } } std::string_view get_type_name() const override { return "osd_beacon"; } - void print(ostream &out) const { + void print(std::ostream &out) const { out << get_type_name() << "(pgs " << pgs << " lec " << min_last_epoch_clean diff --git a/src/messages/MOSDBoot.h b/src/messages/MOSDBoot.h index 4e2cdf0bd49..02a1411dd89 100644 --- a/src/messages/MOSDBoot.h +++ b/src/messages/MOSDBoot.h @@ -31,7 +31,7 @@ private: entity_addrvec_t hb_back_addrs, hb_front_addrs; entity_addrvec_t cluster_addrs; epoch_t boot_epoch; // last epoch this daemon was added to the map (if any) - map<string,string> metadata; ///< misc metadata about this osd + std::map<std::string,std::string> metadata; ///< misc metadata about this osd uint64_t osd_features; MOSDBoot() @@ -57,12 +57,12 @@ private: public: std::string_view get_type_name() const override { return "osd_boot"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "osd_boot(osd." << sb.whoami << " booted " << boot_epoch << " features " << osd_features << " v" << version << ")"; } - + void encode_payload(uint64_t features) override { header.version = HEAD_VERSION; header.compat_version = COMPAT_VERSION; @@ -90,6 +90,7 @@ public: } void decode_payload() override { auto p = payload.cbegin(); + using ceph::decode; paxos_decode(p); if (header.version < 7) { entity_addr_t a; diff --git a/src/messages/MOSDECSubOpRead.h b/src/messages/MOSDECSubOpRead.h index ec97de62a27..254357f137f 100644 --- a/src/messages/MOSDECSubOpRead.h +++ b/src/messages/MOSDECSubOpRead.h @@ -46,6 +46,7 @@ public: {} void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(pgid, p); decode(map_epoch, p); @@ -69,7 +70,7 @@ public: std::string_view get_type_name() const override { return "MOSDECSubOpRead"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "MOSDECSubOpRead(" << pgid << " " << map_epoch << "/" << min_epoch << " " << op; diff --git a/src/messages/MOSDECSubOpReadReply.h b/src/messages/MOSDECSubOpReadReply.h index fb5e8011227..b71c22db43b 100644 --- a/src/messages/MOSDECSubOpReadReply.h +++ b/src/messages/MOSDECSubOpReadReply.h @@ -46,6 +46,7 @@ public: {} void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(pgid, p); decode(map_epoch, p); @@ -69,7 +70,7 @@ public: std::string_view get_type_name() const override { return "MOSDECSubOpReadReply"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "MOSDECSubOpReadReply(" << pgid << " " << map_epoch << "/" << min_epoch << " " << op; diff --git a/src/messages/MOSDECSubOpWrite.h b/src/messages/MOSDECSubOpWrite.h index f5ccf652306..e1e37d096df 100644 --- a/src/messages/MOSDECSubOpWrite.h +++ b/src/messages/MOSDECSubOpWrite.h @@ -50,6 +50,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(pgid, p); decode(map_epoch, p); @@ -73,7 +74,7 @@ public: std::string_view get_type_name() const override { return "MOSDECSubOpWrite"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "MOSDECSubOpWrite(" << pgid << " " << map_epoch << "/" << min_epoch << " " << op; diff --git a/src/messages/MOSDECSubOpWriteReply.h b/src/messages/MOSDECSubOpWriteReply.h index 743180abe4d..7a813d28357 100644 --- a/src/messages/MOSDECSubOpWriteReply.h +++ b/src/messages/MOSDECSubOpWriteReply.h @@ -46,6 +46,7 @@ public: {} void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(pgid, p); decode(map_epoch, p); @@ -69,7 +70,7 @@ public: std::string_view get_type_name() const override { return "MOSDECSubOpWriteReply"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "MOSDECSubOpWriteReply(" << pgid << " " << map_epoch << "/" << min_epoch << " " << op; diff --git a/src/messages/MOSDFailure.h b/src/messages/MOSDFailure.h index 0702034bd7b..1f83d41194a 100644 --- a/src/messages/MOSDFailure.h +++ b/src/messages/MOSDFailure.h @@ -71,6 +71,7 @@ public: epoch_t get_epoch() const { return epoch; } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); paxos_decode(p); decode(fsid, p); @@ -113,7 +114,7 @@ public: } std::string_view get_type_name() const override { return "osd_failure"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "osd_failure(" << (if_osd_failed() ? "failed " : "recovered ") << (is_immediate() ? "immediate " : "timeout ") diff --git a/src/messages/MOSDForceRecovery.h b/src/messages/MOSDForceRecovery.h index 9e86c3320bd..93adf48bc83 100644 --- a/src/messages/MOSDForceRecovery.h +++ b/src/messages/MOSDForceRecovery.h @@ -37,14 +37,14 @@ public: static constexpr int COMPAT_VERSION = 2; uuid_d fsid; - vector<spg_t> forced_pgs; + std::vector<spg_t> forced_pgs; uint8_t options = 0; MOSDForceRecovery() : Message{MSG_OSD_FORCE_RECOVERY, HEAD_VERSION, COMPAT_VERSION} {} MOSDForceRecovery(const uuid_d& f, char opts) : Message{MSG_OSD_FORCE_RECOVERY, HEAD_VERSION, COMPAT_VERSION}, fsid(f), options(opts) {} - MOSDForceRecovery(const uuid_d& f, vector<spg_t>& pgs, char opts) : + MOSDForceRecovery(const uuid_d& f, std::vector<spg_t>& pgs, char opts) : Message{MSG_OSD_FORCE_RECOVERY, HEAD_VERSION, COMPAT_VERSION}, fsid(f), forced_pgs(pgs), options(opts) {} private: @@ -52,7 +52,7 @@ private: public: std::string_view get_type_name() const { return "force_recovery"; } - void print(ostream& out) const { + void print(std::ostream& out) const { out << "force_recovery("; if (forced_pgs.empty()) out << "osd"; @@ -72,7 +72,7 @@ public: if (!HAVE_FEATURE(features, SERVER_MIMIC)) { header.version = 1; header.compat_version = 1; - vector<pg_t> pgs; + std::vector<pg_t> pgs; for (auto pgid : forced_pgs) { pgs.push_back(pgid.pgid); } @@ -88,9 +88,10 @@ public: encode(options, payload); } void decode_payload() { + using ceph::decode; auto p = payload.cbegin(); if (header.version == 1) { - vector<pg_t> pgs; + std::vector<pg_t> pgs; decode(fsid, p); decode(pgs, p); decode(options, p); diff --git a/src/messages/MOSDFull.h b/src/messages/MOSDFull.h index bf6bd35c71c..5f50391e87d 100644 --- a/src/messages/MOSDFull.h +++ b/src/messages/MOSDFull.h @@ -33,6 +33,7 @@ public: encode(state, payload); } void decode_payload() { + using ceph::decode; auto p = payload.cbegin(); paxos_decode(p); decode(map_epoch, p); @@ -40,8 +41,8 @@ public: } std::string_view get_type_name() const { return "osd_full"; } - void print(ostream &out) const { - set<string> states; + void print(std::ostream &out) const { + std::set<std::string> states; OSDMap::calc_state_set(state, states); out << "osd_full(e" << map_epoch << " " << states << " v" << version << ")"; } diff --git a/src/messages/MOSDMarkMeDead.h b/src/messages/MOSDMarkMeDead.h index 9e8b306fcdc..d7c376e6314 100644 --- a/src/messages/MOSDMarkMeDead.h +++ b/src/messages/MOSDMarkMeDead.h @@ -31,6 +31,7 @@ public: epoch_t get_epoch() const { return epoch; } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); paxos_decode(p); decode(fsid, p); @@ -49,7 +50,7 @@ public: } std::string_view get_type_name() const override { return "MOSDMarkMeDead"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "MOSDMarkMeDead(" << "osd." << target_osd << ", epoch " << epoch diff --git a/src/messages/MOSDMarkMeDown.h b/src/messages/MOSDMarkMeDown.h index b99008318c5..afe71130fd1 100644 --- a/src/messages/MOSDMarkMeDown.h +++ b/src/messages/MOSDMarkMeDown.h @@ -45,6 +45,7 @@ public: epoch_t get_epoch() const { return epoch; } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); paxos_decode(p); if (header.version <= 2) { @@ -88,7 +89,7 @@ public: } std::string_view get_type_name() const override { return "MOSDMarkMeDown"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "MOSDMarkMeDown(" << "request_ack=" << request_ack << ", osd." << target_osd diff --git a/src/messages/MOSDOpReply.h b/src/messages/MOSDOpReply.h index 206b5df74af..3824e30c307 100644 --- a/src/messages/MOSDOpReply.h +++ b/src/messages/MOSDOpReply.h @@ -106,7 +106,7 @@ public: o.swap(ops); bdata_encode = false; } - void set_op_returns(const vector<pg_log_op_return_item_t>& op_returns) { + void set_op_returns(const std::vector<pg_log_op_return_item_t>& op_returns) { if (op_returns.size()) { ceph_assert(ops.empty() || ops.size() == op_returns.size()); ops.resize(op_returns.size()); diff --git a/src/messages/MOSDPGBackfill.h b/src/messages/MOSDPGBackfill.h index ee2eb82fe86..50d84fed8c8 100644 --- a/src/messages/MOSDPGBackfill.h +++ b/src/messages/MOSDPGBackfill.h @@ -53,6 +53,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(op, p); decode(map_epoch, p); @@ -100,7 +101,7 @@ private: public: std::string_view get_type_name() const override { return "pg_backfill"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "pg_backfill(" << get_op_name(op) << " " << pgid << " e " << map_epoch << "/" << query_epoch diff --git a/src/messages/MOSDPGBackfillRemove.h b/src/messages/MOSDPGBackfillRemove.h index 5c70c386f3d..652fb2c1d6b 100644 --- a/src/messages/MOSDPGBackfillRemove.h +++ b/src/messages/MOSDPGBackfillRemove.h @@ -28,7 +28,7 @@ public: spg_t pgid; ///< target spg_t epoch_t map_epoch = 0; - list<pair<hobject_t,eversion_t>> ls; ///< objects to remove + std::list<std::pair<hobject_t,eversion_t>> ls; ///< objects to remove epoch_t get_map_epoch() const override { return map_epoch; @@ -53,7 +53,7 @@ private: public: std::string_view get_type_name() const override { return "backfill_remove"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "backfill_remove(" << pgid << " e" << map_epoch << " " << ls << ")"; } @@ -65,6 +65,7 @@ public: encode(ls, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(pgid, p); decode(map_epoch, p); diff --git a/src/messages/MOSDPGCreate.h b/src/messages/MOSDPGCreate.h index 09aa2e9c2e3..cfea60baef5 100644 --- a/src/messages/MOSDPGCreate.h +++ b/src/messages/MOSDPGCreate.h @@ -29,8 +29,8 @@ public: static constexpr int COMPAT_VERSION = 3; version_t epoch = 0; - map<pg_t,pg_create_t> mkpg; - map<pg_t,utime_t> ctimes; + std::map<pg_t,pg_create_t> mkpg; + std::map<pg_t,utime_t> ctimes; MOSDPGCreate() : MOSDPGCreate{0} @@ -42,7 +42,7 @@ public: private: ~MOSDPGCreate() override {} -public: +public: std::string_view get_type_name() const override { return "pg_create"; } void encode_payload(uint64_t features) override { @@ -52,16 +52,15 @@ public: encode(ctimes, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(epoch, p); decode(mkpg, p); decode(ctimes, p); } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "osd_pg_create(e" << epoch; - for (map<pg_t,pg_create_t>::const_iterator i = mkpg.begin(); - i != mkpg.end(); - ++i) { + for (auto i = mkpg.begin(); i != mkpg.end(); ++i) { out << " " << i->first << ":" << i->second.created; } out << ")"; diff --git a/src/messages/MOSDPGCreate2.h b/src/messages/MOSDPGCreate2.h index 58dffdf1028..c37a254c81b 100644 --- a/src/messages/MOSDPGCreate2.h +++ b/src/messages/MOSDPGCreate2.h @@ -31,7 +31,7 @@ public: std::string_view get_type_name() const override { return "pg_create2"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "pg_create2(e" << epoch << " " << pgs << ")"; } diff --git a/src/messages/MOSDPGCreated.h b/src/messages/MOSDPGCreated.h index 7ec6c34dc16..9be8e2ddc59 100644 --- a/src/messages/MOSDPGCreated.h +++ b/src/messages/MOSDPGCreated.h @@ -17,7 +17,7 @@ public: pgid(pgid) {} std::string_view get_type_name() const override { return "pg_created"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "osd_pg_created(" << pgid << ")"; } void encode_payload(uint64_t features) override { @@ -26,6 +26,7 @@ public: encode(pgid, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); paxos_decode(p); decode(pgid, p); diff --git a/src/messages/MOSDPGInfo.h b/src/messages/MOSDPGInfo.h index a439089bd3a..4ec8021ac4b 100644 --- a/src/messages/MOSDPGInfo.h +++ b/src/messages/MOSDPGInfo.h @@ -50,7 +50,7 @@ private: public: std::string_view get_type_name() const override { return "pg_info"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "pg_info("; for (auto i = pg_list.begin(); i != pg_list.end(); @@ -80,6 +80,7 @@ public: encode(pg_list, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(epoch, p); if (header.version == 5) { diff --git a/src/messages/MOSDPGLease.h b/src/messages/MOSDPGLease.h index 9b8fcf3b2e0..1a40fd7ccfd 100644 --- a/src/messages/MOSDPGLease.h +++ b/src/messages/MOSDPGLease.h @@ -45,7 +45,7 @@ private: public: std::string_view get_type_name() const override { return "pg_lease"; } - void inner_print(ostream& out) const override { + void inner_print(std::ostream& out) const override { out << lease; } @@ -56,6 +56,7 @@ public: encode(lease, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(epoch, p); decode(spgid, p); diff --git a/src/messages/MOSDPGLeaseAck.h b/src/messages/MOSDPGLeaseAck.h index 8a4bd5c028c..0bfb1cff992 100644 --- a/src/messages/MOSDPGLeaseAck.h +++ b/src/messages/MOSDPGLeaseAck.h @@ -45,7 +45,7 @@ private: public: std::string_view get_type_name() const override { return "pg_lease_ack"; } - void inner_print(ostream& out) const override { + void inner_print(std::ostream& out) const override { out << lease_ack; } @@ -56,6 +56,7 @@ public: encode(lease_ack, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(epoch, p); decode(spgid, p); diff --git a/src/messages/MOSDPGNotify.h b/src/messages/MOSDPGNotify.h index 9f25fa24241..848bf00d004 100644 --- a/src/messages/MOSDPGNotify.h +++ b/src/messages/MOSDPGNotify.h @@ -76,6 +76,7 @@ public: void decode_payload() override { auto p = payload.cbegin(); + using ceph::decode; decode(epoch, p); if (header.version == 6) { // decode legacy vector<pair<pg_notify_t,PastIntervals>> @@ -90,7 +91,7 @@ public: } decode(pg_list, p); } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "pg_notify("; for (auto i = pg_list.begin(); i != pg_list.end(); diff --git a/src/messages/MOSDPGPull.h b/src/messages/MOSDPGPull.h index 8611e10bb6b..37c286a0a1e 100644 --- a/src/messages/MOSDPGPull.h +++ b/src/messages/MOSDPGPull.h @@ -22,7 +22,7 @@ private: static constexpr int HEAD_VERSION = 3; static constexpr int COMPAT_VERSION = 2; - vector<PullOp> pulls; + std::vector<PullOp> pulls; public: pg_shard_t from; @@ -40,10 +40,10 @@ public: return pgid; } - void take_pulls(vector<PullOp> *outpulls) { + void take_pulls(std::vector<PullOp> *outpulls) { outpulls->swap(pulls); } - void set_pulls(vector<PullOp> *inpulls) { + void set_pulls(std::vector<PullOp> *inpulls) { inpulls->swap(pulls); } @@ -53,9 +53,7 @@ public: void compute_cost(CephContext *cct) { cost = 0; - for (vector<PullOp>::iterator i = pulls.begin(); - i != pulls.end(); - ++i) { + for (auto i = pulls.begin(); i != pulls.end(); ++i) { cost += i->cost(cct); } } @@ -65,6 +63,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(pgid.pgid, p); decode(map_epoch, p); @@ -92,7 +91,7 @@ public: std::string_view get_type_name() const override { return "MOSDPGPull"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "MOSDPGPull(" << pgid << " e" << map_epoch << "/" << min_epoch << " cost " << cost diff --git a/src/messages/MOSDPGPush.h b/src/messages/MOSDPGPush.h index 01df5b81f06..df9dbae5b7c 100644 --- a/src/messages/MOSDPGPush.h +++ b/src/messages/MOSDPGPush.h @@ -26,7 +26,7 @@ public: pg_shard_t from; spg_t pgid; epoch_t map_epoch = 0, min_epoch = 0; - vector<PushOp> pushes; + std::vector<PushOp> pushes; bool is_repair = false; private: @@ -35,9 +35,7 @@ private: public: void compute_cost(CephContext *cct) { cost = 0; - for (vector<PushOp>::iterator i = pushes.begin(); - i != pushes.end(); - ++i) { + for (auto i = pushes.begin(); i != pushes.end(); ++i) { cost += i->cost(cct); } } @@ -65,6 +63,7 @@ public: {} void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(pgid.pgid, p); decode(map_epoch, p); @@ -98,7 +97,7 @@ public: std::string_view get_type_name() const override { return "MOSDPGPush"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "MOSDPGPush(" << pgid << " " << map_epoch << "/" << min_epoch << " " << pushes; diff --git a/src/messages/MOSDPGPushReply.h b/src/messages/MOSDPGPushReply.h index f95555b7f41..1fdfd9b69d9 100644 --- a/src/messages/MOSDPGPushReply.h +++ b/src/messages/MOSDPGPushReply.h @@ -26,7 +26,7 @@ public: pg_shard_t from; spg_t pgid; epoch_t map_epoch = 0, min_epoch = 0; - vector<PushReplyOp> replies; + std::vector<PushReplyOp> replies; uint64_t cost = 0; epoch_t get_map_epoch() const override { @@ -45,9 +45,7 @@ public: void compute_cost(CephContext *cct) { cost = 0; - for (vector<PushReplyOp>::iterator i = replies.begin(); - i != replies.end(); - ++i) { + for (auto i = replies.begin(); i != replies.end(); ++i) { cost += i->cost(cct); } } @@ -57,6 +55,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(pgid.pgid, p); decode(map_epoch, p); @@ -82,7 +81,7 @@ public: encode(min_epoch, payload); } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "MOSDPGPushReply(" << pgid << " " << map_epoch << "/" << min_epoch << " " << replies; diff --git a/src/messages/MOSDPGQuery.h b/src/messages/MOSDPGQuery.h index 9d78e61ab90..2b686b698c1 100644 --- a/src/messages/MOSDPGQuery.h +++ b/src/messages/MOSDPGQuery.h @@ -53,10 +53,9 @@ private: public: std::string_view get_type_name() const override { return "pg_query"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "pg_query("; - for (map<spg_t,pg_query_t>::const_iterator p = pg_list.begin(); - p != pg_list.end(); ++p) { + for (auto p = pg_list.begin(); p != pg_list.end(); ++p) { if (p != pg_list.begin()) out << ","; out << p->first; @@ -70,6 +69,7 @@ public: encode(pg_list, payload, features); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(epoch, p); decode(pg_list, p); diff --git a/src/messages/MOSDPGReadyToMerge.h b/src/messages/MOSDPGReadyToMerge.h index e8f3b81bb88..e7521263853 100644 --- a/src/messages/MOSDPGReadyToMerge.h +++ b/src/messages/MOSDPGReadyToMerge.h @@ -35,7 +35,8 @@ public: encode(ready, payload); } void decode_payload() override { - bufferlist::const_iterator p = payload.begin(); + using ceph::decode; + auto p = payload.cbegin(); paxos_decode(p); decode(pgid, p); decode(source_version, p); @@ -45,7 +46,7 @@ public: decode(ready, p); } std::string_view get_type_name() const override { return "osd_pg_ready_to_merge"; } - void print(ostream &out) const { + void print(std::ostream &out) const { out << get_type_name() << "(" << pgid << " sv " << source_version diff --git a/src/messages/MOSDPGRecoveryDelete.h b/src/messages/MOSDPGRecoveryDelete.h index 88f82a6f5ab..44539300dfa 100644 --- a/src/messages/MOSDPGRecoveryDelete.h +++ b/src/messages/MOSDPGRecoveryDelete.h @@ -18,7 +18,7 @@ public: pg_shard_t from; spg_t pgid; ///< target spg_t epoch_t map_epoch, min_epoch; - list<pair<hobject_t, eversion_t> > objects; ///< objects to remove + std::list<std::pair<hobject_t, eversion_t>> objects; ///< objects to remove private: uint64_t cost = 0; @@ -62,7 +62,7 @@ private: public: std::string_view get_type_name() const { return "recovery_delete"; } - void print(ostream& out) const { + void print(std::ostream& out) const { out << "MOSDPGRecoveryDelete(" << pgid << " e" << map_epoch << "," << min_epoch << " " << objects << ")"; } @@ -77,6 +77,7 @@ public: encode(objects, payload); } void decode_payload() { + using ceph::decode; auto p = payload.cbegin(); decode(from, p); decode(pgid, p); diff --git a/src/messages/MOSDPGRecoveryDeleteReply.h b/src/messages/MOSDPGRecoveryDeleteReply.h index e870e587f84..60f494b62be 100644 --- a/src/messages/MOSDPGRecoveryDeleteReply.h +++ b/src/messages/MOSDPGRecoveryDeleteReply.h @@ -15,7 +15,7 @@ public: spg_t pgid; epoch_t map_epoch = 0; epoch_t min_epoch = 0; - list<pair<hobject_t, eversion_t> > objects; + std::list<std::pair<hobject_t, eversion_t> > objects; epoch_t get_map_epoch() const override { return map_epoch; @@ -32,6 +32,7 @@ public: {} void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(pgid.pgid, p); decode(map_epoch, p); @@ -51,7 +52,7 @@ public: encode(from, payload); } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "MOSDPGRecoveryDeleteReply(" << pgid << " e" << map_epoch << "," << min_epoch << " " << objects << ")"; } diff --git a/src/messages/MOSDPGRemove.h b/src/messages/MOSDPGRemove.h index b91c423a96c..a1cb47683c9 100644 --- a/src/messages/MOSDPGRemove.h +++ b/src/messages/MOSDPGRemove.h @@ -28,13 +28,13 @@ private: epoch_t epoch = 0; public: - vector<spg_t> pg_list; + std::vector<spg_t> pg_list; epoch_t get_epoch() const { return epoch; } MOSDPGRemove() : Message{MSG_OSD_PG_REMOVE, HEAD_VERSION, COMPAT_VERSION} {} - MOSDPGRemove(epoch_t e, vector<spg_t>& l) : + MOSDPGRemove(epoch_t e, std::vector<spg_t>& l) : Message{MSG_OSD_PG_REMOVE, HEAD_VERSION, COMPAT_VERSION} { this->epoch = e; pg_list.swap(l); @@ -42,7 +42,7 @@ private: private: ~MOSDPGRemove() override {} -public: +public: std::string_view get_type_name() const override { return "PGrm"; } void encode_payload(uint64_t features) override { @@ -51,15 +51,14 @@ public: encode(pg_list, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(epoch, p); decode(pg_list, p); } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "osd pg remove(" << "epoch " << epoch << "; "; - for (vector<spg_t>::const_iterator i = pg_list.begin(); - i != pg_list.end(); - ++i) { + for (auto i = pg_list.begin(); i != pg_list.end(); ++i) { out << "pg" << *i << "; "; } out << ")"; diff --git a/src/messages/MOSDPGScan.h b/src/messages/MOSDPGScan.h index 9ed058e0643..1556228b503 100644 --- a/src/messages/MOSDPGScan.h +++ b/src/messages/MOSDPGScan.h @@ -52,6 +52,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(op, p); decode(map_epoch, p); @@ -103,7 +104,7 @@ private: public: std::string_view get_type_name() const override { return "pg_scan"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "pg_scan(" << get_op_name(op) << " " << pgid << " " << begin << "-" << end diff --git a/src/messages/MOSDPGTemp.h b/src/messages/MOSDPGTemp.h index 3a247bd090c..26547550fc4 100644 --- a/src/messages/MOSDPGTemp.h +++ b/src/messages/MOSDPGTemp.h @@ -22,7 +22,7 @@ class MOSDPGTemp : public PaxosServiceMessage { public: epoch_t map_epoch = 0; - map<pg_t, vector<int32_t> > pg_temp; + std::map<pg_t, std::vector<int32_t> > pg_temp; bool forced = false; MOSDPGTemp(epoch_t e) @@ -44,6 +44,7 @@ public: encode(forced, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); paxos_decode(p); decode(map_epoch, p); @@ -54,7 +55,7 @@ public: } std::string_view get_type_name() const override { return "osd_pgtemp"; } - void print(ostream &out) const override { + void print(std::ostream &out) const override { out << "osd_pgtemp(e" << map_epoch << " " << pg_temp << " v" << version << ")"; } private: diff --git a/src/messages/MOSDPGTrim.h b/src/messages/MOSDPGTrim.h index 7155363ed06..df9b3f5baac 100644 --- a/src/messages/MOSDPGTrim.h +++ b/src/messages/MOSDPGTrim.h @@ -55,7 +55,7 @@ private: public: std::string_view get_type_name() const override { return "pg_trim"; } - void inner_print(ostream& out) const override { + void inner_print(std::ostream& out) const override { out << trim_to; } @@ -67,6 +67,7 @@ public: encode(pgid.shard, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(epoch, p); decode(pgid.pgid, p); diff --git a/src/messages/MOSDPGUpdateLogMissing.h b/src/messages/MOSDPGUpdateLogMissing.h index b661e414cef..40c69aa9626 100644 --- a/src/messages/MOSDPGUpdateLogMissing.h +++ b/src/messages/MOSDPGUpdateLogMissing.h @@ -77,7 +77,7 @@ private: public: std::string_view get_type_name() const override { return "PGUpdateLogMissing"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "pg_update_log_missing(" << pgid << " epoch " << map_epoch << "/" << min_epoch << " rep_tid " << rep_tid @@ -99,6 +99,7 @@ public: encode(pg_roll_forward_to, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(map_epoch, p); decode(pgid, p); diff --git a/src/messages/MOSDPGUpdateLogMissingReply.h b/src/messages/MOSDPGUpdateLogMissingReply.h index 1aa4fb6ab15..07f730af3d7 100644 --- a/src/messages/MOSDPGUpdateLogMissingReply.h +++ b/src/messages/MOSDPGUpdateLogMissingReply.h @@ -75,7 +75,7 @@ private: public: std::string_view get_type_name() const override { return "PGUpdateLogMissingReply"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "pg_update_log_missing_reply(" << pgid << " epoch " << map_epoch << "/" << min_epoch << " rep_tid " << rep_tid @@ -92,6 +92,7 @@ public: encode(last_complete_ondisk, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(map_epoch, p); decode(pgid, p); diff --git a/src/messages/MOSDPing.h b/src/messages/MOSDPing.h index 530c803ce48..126064252c7 100644 --- a/src/messages/MOSDPing.h +++ b/src/messages/MOSDPing.h @@ -93,6 +93,7 @@ private: public: void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(fsid, p); decode(map_epoch, p); @@ -138,17 +139,17 @@ public: // that at runtime we are only adding a bufferptr reference to it. static char zeros[16384] = {}; while (s > sizeof(zeros)) { - payload.append(buffer::create_static(sizeof(zeros), zeros)); + payload.append(ceph::buffer::create_static(sizeof(zeros), zeros)); s -= sizeof(zeros); } if (s) { - payload.append(buffer::create_static(s, zeros)); + payload.append(ceph::buffer::create_static(s, zeros)); } } } std::string_view get_type_name() const override { return "osd_ping"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "osd_ping(" << get_op_name(op) << " e" << map_epoch << " up_from " << up_from diff --git a/src/messages/MOSDRepScrub.h b/src/messages/MOSDRepScrub.h index 6afbd4eb693..86bdfa6400a 100644 --- a/src/messages/MOSDRepScrub.h +++ b/src/messages/MOSDRepScrub.h @@ -76,7 +76,7 @@ private: public: std::string_view get_type_name() const override { return "replica scrub"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "replica_scrub(pg: " << pgid << ",from:" << scrub_from << ",to:" << scrub_to @@ -109,6 +109,7 @@ public: encode(high_priority, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(pgid.pgid, p); decode(scrub_from, p); diff --git a/src/messages/MOSDRepScrubMap.h b/src/messages/MOSDRepScrubMap.h index 4e46672102a..38d687c1274 100644 --- a/src/messages/MOSDRepScrubMap.h +++ b/src/messages/MOSDRepScrubMap.h @@ -29,7 +29,7 @@ public: spg_t pgid; // primary spg_t epoch_t map_epoch = 0; pg_shard_t from; // whose scrubmap this is - bufferlist scrub_map_bl; + ceph::buffer::list scrub_map_bl; bool preempted = false; epoch_t get_map_epoch() const override { @@ -53,7 +53,7 @@ private: public: std::string_view get_type_name() const override { return "rep_scrubmap"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "rep_scrubmap(" << pgid << " e" << map_epoch << " from shard " << from << (preempted ? " PREEMPTED":"") << ")"; @@ -67,6 +67,7 @@ public: encode(preempted, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(pgid, p); decode(map_epoch, p); diff --git a/src/messages/MOSDScrub.h b/src/messages/MOSDScrub.h index 646e5e33f52..19000280a3b 100644 --- a/src/messages/MOSDScrub.h +++ b/src/messages/MOSDScrub.h @@ -28,7 +28,7 @@ public: static constexpr int COMPAT_VERSION = 2; uuid_d fsid; - vector<pg_t> scrub_pgs; + std::vector<pg_t> scrub_pgs; bool repair = false; bool deep = false; @@ -36,7 +36,7 @@ public: MOSDScrub(const uuid_d& f, bool r, bool d) : Message{MSG_OSD_SCRUB, HEAD_VERSION, COMPAT_VERSION}, fsid(f), repair(r), deep(d) {} - MOSDScrub(const uuid_d& f, vector<pg_t>& pgs, bool r, bool d) : + MOSDScrub(const uuid_d& f, std::vector<pg_t>& pgs, bool r, bool d) : Message{MSG_OSD_SCRUB, HEAD_VERSION, COMPAT_VERSION}, fsid(f), scrub_pgs(pgs), repair(r), deep(d) {} private: @@ -44,7 +44,7 @@ private: public: std::string_view get_type_name() const override { return "scrub"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "scrub("; if (scrub_pgs.empty()) out << "osd"; @@ -65,6 +65,7 @@ public: encode(deep, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(fsid, p); decode(scrub_pgs, p); diff --git a/src/messages/MOSDScrub2.h b/src/messages/MOSDScrub2.h index d5156110629..06a884913ab 100644 --- a/src/messages/MOSDScrub2.h +++ b/src/messages/MOSDScrub2.h @@ -16,12 +16,12 @@ public: uuid_d fsid; epoch_t epoch; - vector<spg_t> scrub_pgs; + std::vector<spg_t> scrub_pgs; bool repair = false; bool deep = false; MOSDScrub2() : Message{MSG_OSD_SCRUB2, HEAD_VERSION, COMPAT_VERSION} {} - MOSDScrub2(const uuid_d& f, epoch_t e, vector<spg_t>& pgs, bool r, bool d) : + MOSDScrub2(const uuid_d& f, epoch_t e, std::vector<spg_t>& pgs, bool r, bool d) : Message{MSG_OSD_SCRUB2, HEAD_VERSION, COMPAT_VERSION}, fsid(f), epoch(e), scrub_pgs(pgs), repair(r), deep(d) {} private: @@ -29,7 +29,7 @@ private: public: std::string_view get_type_name() const override { return "scrub2"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "scrub2(" << scrub_pgs; if (repair) out << " repair"; @@ -47,6 +47,7 @@ public: encode(deep, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(fsid, p); decode(epoch, p); diff --git a/src/messages/MOSDScrubReserve.h b/src/messages/MOSDScrubReserve.h index 7f3eb64f1f4..f1f76b3e6fe 100644 --- a/src/messages/MOSDScrubReserve.h +++ b/src/messages/MOSDScrubReserve.h @@ -55,7 +55,7 @@ public: return "MOSDScrubReserve"; } - void print(ostream& out) const { + void print(std::ostream& out) const { out << "MOSDScrubReserve(" << pgid << " "; switch (type) { case REQUEST: @@ -76,6 +76,7 @@ public: } void decode_payload() { + using ceph::decode; auto p = payload.cbegin(); decode(pgid, p); decode(map_epoch, p); diff --git a/src/messages/MPGStatsAck.h b/src/messages/MPGStatsAck.h index 5afbab580dd..b5c87a194f8 100644 --- a/src/messages/MPGStatsAck.h +++ b/src/messages/MPGStatsAck.h @@ -19,8 +19,8 @@ class MPGStatsAck : public Message { public: - map<pg_t,pair<version_t,epoch_t> > pg_stat; - + std::map<pg_t,std::pair<version_t,epoch_t> > pg_stat; + MPGStatsAck() : Message{MSG_PGSTATSACK} {} private: @@ -28,7 +28,7 @@ private: public: std::string_view get_type_name() const override { return "pg_stats_ack"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "pg_stats_ack(" << pg_stat.size() << " pgs tid " << get_tid() << ")"; } @@ -37,6 +37,7 @@ public: encode(pg_stat, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(pg_stat, p); } diff --git a/src/messages/MRecoveryReserve.h b/src/messages/MRecoveryReserve.h index 993f0391e3b..55fb2d81b81 100644 --- a/src/messages/MRecoveryReserve.h +++ b/src/messages/MRecoveryReserve.h @@ -87,7 +87,7 @@ public: return "MRecoveryReserve"; } - void inner_print(ostream& out) const override { + void inner_print(std::ostream& out) const override { switch (type) { case REQUEST: out << "REQUEST"; @@ -107,6 +107,7 @@ public: void decode_payload() override { auto p = payload.cbegin(); + using ceph::decode; decode(pgid.pgid, p); decode(query_epoch, p); decode(type, p); diff --git a/src/messages/MRemoveSnaps.h b/src/messages/MRemoveSnaps.h index f6497c05e26..4203d79cc47 100644 --- a/src/messages/MRemoveSnaps.h +++ b/src/messages/MRemoveSnaps.h @@ -19,12 +19,12 @@ class MRemoveSnaps : public PaxosServiceMessage { public: - map<int32_t, vector<snapid_t> > snaps; - + std::map<int32_t, std::vector<snapid_t>> snaps; + protected: - MRemoveSnaps() : + MRemoveSnaps() : PaxosServiceMessage{MSG_REMOVE_SNAPS, 0} { } - MRemoveSnaps(map<int, vector<snapid_t> >& s) : + MRemoveSnaps(std::map<int, std::vector<snapid_t>>& s) : PaxosServiceMessage{MSG_REMOVE_SNAPS, 0} { snaps.swap(s); } @@ -32,7 +32,7 @@ protected: public: std::string_view get_type_name() const override { return "remove_snaps"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "remove_snaps(" << snaps << " v" << version << ")"; } @@ -42,6 +42,7 @@ public: encode(snaps, payload); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); paxos_decode(p); decode(snaps, p); diff --git a/src/messages/MRoute.h b/src/messages/MRoute.h index 90f36ef49c5..4565b1d93f4 100644 --- a/src/messages/MRoute.h +++ b/src/messages/MRoute.h @@ -47,6 +47,7 @@ private: public: void decode_payload() override { auto p = payload.cbegin(); + using ceph::decode; decode(session_mon_tid, p); entity_inst_t dest_unused; decode(dest_unused, p); @@ -69,7 +70,7 @@ public: } std::string_view get_type_name() const override { return "route"; } - void print(ostream& o) const override { + void print(std::ostream& o) const override { if (msg) o << "route(" << *msg; else diff --git a/src/messages/MServiceMap.h b/src/messages/MServiceMap.h index 45d50b67b69..18daea3dad2 100644 --- a/src/messages/MServiceMap.h +++ b/src/messages/MServiceMap.h @@ -20,7 +20,7 @@ private: public: std::string_view get_type_name() const override { return "service_map"; } - void print(ostream& out) const override { + void print(std::ostream& out) const override { out << "service_map(e" << service_map.epoch << " " << service_map.services.size() << " svc)"; } @@ -29,6 +29,7 @@ public: encode(service_map, payload, features); } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(service_map, p); } diff --git a/src/messages/MTimeCheck.h b/src/messages/MTimeCheck.h index fe96f5a0f11..631d67e0c86 100644 --- a/src/messages/MTimeCheck.h +++ b/src/messages/MTimeCheck.h @@ -52,7 +52,7 @@ public: } return "???"; } - void print(ostream &o) const override { + void print(std::ostream &o) const override { o << "time_check( " << get_op_name() << " e " << epoch << " r " << round; if (op == OP_PONG) { @@ -65,6 +65,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(op, p); decode(epoch, p); diff --git a/src/messages/MTimeCheck2.h b/src/messages/MTimeCheck2.h index 32f089c0926..0fcd3136ead 100644 --- a/src/messages/MTimeCheck2.h +++ b/src/messages/MTimeCheck2.h @@ -52,7 +52,7 @@ public: } return "???"; } - void print(ostream &o) const override { + void print(std::ostream &o) const override { o << "time_check( " << get_op_name() << " e " << epoch << " r " << round; if (op == OP_PONG) { @@ -65,6 +65,7 @@ public: } void decode_payload() override { + using ceph::decode; auto p = payload.cbegin(); decode(op, p); decode(epoch, p); diff --git a/src/mgr/MetricTypes.h b/src/mgr/MetricTypes.h index 3d4d4a68ee6..1bcc0170659 100644 --- a/src/mgr/MetricTypes.h +++ b/src/mgr/MetricTypes.h @@ -47,7 +47,7 @@ typedef boost::variant<OSDMetricPayload, class EncodeMetricPayloadVisitor : public boost::static_visitor<void> { public: - explicit EncodeMetricPayloadVisitor(bufferlist &bl) : m_bl(bl) { + explicit EncodeMetricPayloadVisitor(ceph::buffer::list &bl) : m_bl(bl) { } template <typename MetricPayload> @@ -58,12 +58,12 @@ public: } private: - bufferlist &m_bl; + ceph::buffer::list &m_bl; }; class DecodeMetricPayloadVisitor : public boost::static_visitor<void> { public: - DecodeMetricPayloadVisitor(bufferlist::const_iterator &iter) : m_iter(iter) { + DecodeMetricPayloadVisitor(ceph::buffer::list::const_iterator &iter) : m_iter(iter) { } template <typename MetricPayload> @@ -73,7 +73,7 @@ public: } private: - bufferlist::const_iterator &m_iter; + ceph::buffer::list::const_iterator &m_iter; }; struct MetricReportMessage { @@ -83,11 +83,11 @@ struct MetricReportMessage { : payload(payload) { } - void encode(bufferlist &bl) const { + void encode(ceph::buffer::list &bl) const { boost::apply_visitor(EncodeMetricPayloadVisitor(bl), payload); } - void decode(bufferlist::const_iterator &iter) { + void decode(ceph::buffer::list::const_iterator &iter) { using ceph::decode; uint32_t metric_report_type; @@ -149,7 +149,7 @@ typedef boost::variant<OSDConfigPayload, class EncodeConfigPayloadVisitor : public boost::static_visitor<void> { public: - explicit EncodeConfigPayloadVisitor(bufferlist &bl) : m_bl(bl) { + explicit EncodeConfigPayloadVisitor(ceph::buffer::list &bl) : m_bl(bl) { } template <typename ConfigPayload> @@ -160,12 +160,12 @@ public: } private: - bufferlist &m_bl; + ceph::buffer::list &m_bl; }; class DecodeConfigPayloadVisitor : public boost::static_visitor<void> { public: - DecodeConfigPayloadVisitor(bufferlist::const_iterator &iter) : m_iter(iter) { + DecodeConfigPayloadVisitor(ceph::buffer::list::const_iterator &iter) : m_iter(iter) { } template <typename ConfigPayload> @@ -175,7 +175,7 @@ public: } private: - bufferlist::const_iterator &m_iter; + ceph::buffer::list::const_iterator &m_iter; }; struct MetricConfigMessage { @@ -185,11 +185,11 @@ struct MetricConfigMessage { : payload(payload) { } - void encode(bufferlist &bl) const { + void encode(ceph::buffer::list &bl) const { boost::apply_visitor(EncodeConfigPayloadVisitor(bl), payload); } - void decode(bufferlist::const_iterator &iter) { + void decode(ceph::buffer::list::const_iterator &iter) { using ceph::decode; uint32_t metric_config_type; diff --git a/src/mgr/MgrClient.cc b/src/mgr/MgrClient.cc index 4903fa3a083..2f998635c3f 100644 --- a/src/mgr/MgrClient.cc +++ b/src/mgr/MgrClient.cc @@ -33,6 +33,9 @@ using std::string; using std::vector; using ceph::bufferlist; +using ceph::make_message; +using ceph::ref_cast; +using ceph::ref_t; #define dout_subsys ceph_subsys_mgrc #undef dout_prefix diff --git a/src/mgr/MgrClient.h b/src/mgr/MgrClient.h index 6ac56fec970..aed1072c674 100644 --- a/src/mgr/MgrClient.h +++ b/src/mgr/MgrClient.h @@ -126,7 +126,7 @@ public: bool handle_mgr_close(ceph::ref_t<MMgrClose> m); bool handle_command_reply( uint64_t tid, - bufferlist& data, + ceph::buffer::list& data, const std::string& rs, int r); @@ -151,7 +151,7 @@ public: ceph::buffer::list *outbl, std::string *outs, Context *onfinish); int start_tell_command( - const string& name, + const std::string& name, const std::vector<std::string>& cmd, const ceph::buffer::list& inbl, ceph::buffer::list *outbl, std::string *outs, Context *onfinish); diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index 57fb9b1554f..75f59231c5a 100644 --- a/src/mon/MonClient.cc +++ b/src/mon/MonClient.cc @@ -542,7 +542,7 @@ int MonClient::authenticate(double timeout) while (!active_con && authenticate_err >= 0) { if (timeout > 0.0) { auto r = auth_cond.wait_until(lock, until); - if (r == cv_status::timeout && !active_con) { + if (r == std::cv_status::timeout && !active_con) { ldout(cct, 0) << "authenticate timed out after " << timeout << dendl; authenticate_err = -ETIMEDOUT; } diff --git a/src/mon/MonCommand.h b/src/mon/MonCommand.h index 2d363302bfa..cb60d3d1706 100644 --- a/src/mon/MonCommand.h +++ b/src/mon/MonCommand.h @@ -39,14 +39,14 @@ struct MonCommand { void set_flag(uint64_t flag) { flags |= flag; } void unset_flag(uint64_t flag) { flags &= ~flag; } - void encode(bufferlist &bl) const { + void encode(ceph::buffer::list &bl) const { ENCODE_START(1, 1, bl); encode_bare(bl); encode(flags, bl); ENCODE_FINISH(bl); } - void decode(bufferlist::const_iterator &bl) { + void decode(ceph::buffer::list::const_iterator &bl) { DECODE_START(1, bl); decode_bare(bl); decode(flags, bl); @@ -56,7 +56,7 @@ struct MonCommand { /** * Unversioned encoding for use within encode_array. */ - void encode_bare(bufferlist &bl) const { + void encode_bare(ceph::buffer::list &bl) const { using ceph::encode; encode(cmdstring, bl); encode(helpstring, bl); @@ -65,7 +65,7 @@ struct MonCommand { std::string availability = "cli,rest"; // Removed field, for backward compat encode(availability, bl); } - void decode_bare(bufferlist::const_iterator &bl) { + void decode_bare(ceph::buffer::list::const_iterator &bl) { using ceph::decode; decode(cmdstring, bl); decode(helpstring, bl); @@ -103,7 +103,7 @@ struct MonCommand { return has_flag(MonCommand::FLAG_HIDDEN); } - static void encode_array(const MonCommand *cmds, int size, bufferlist &bl) { + static void encode_array(const MonCommand *cmds, int size, ceph::buffer::list &bl) { ENCODE_START(2, 1, bl); uint16_t s = size; encode(s, bl); @@ -116,7 +116,7 @@ struct MonCommand { ENCODE_FINISH(bl); } static void decode_array(MonCommand **cmds, int *size, - bufferlist::const_iterator &bl) { + ceph::buffer::list::const_iterator &bl) { DECODE_START(2, bl); uint16_t s = 0; decode(s, bl); @@ -137,7 +137,7 @@ struct MonCommand { // this uses a u16 for the count, so we need a special encoder/decoder. static void encode_vector(const std::vector<MonCommand>& cmds, - bufferlist &bl) { + ceph::buffer::list &bl) { ENCODE_START(2, 1, bl); uint16_t s = cmds.size(); encode(s, bl); @@ -150,7 +150,7 @@ struct MonCommand { ENCODE_FINISH(bl); } static void decode_vector(std::vector<MonCommand> &cmds, - bufferlist::const_iterator &bl) { + ceph::buffer::list::const_iterator &bl) { DECODE_START(2, bl); uint16_t s = 0; decode(s, bl); diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index b4cc322b9f0..3316452b4b0 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -7929,6 +7929,19 @@ int OSDMonitor::prepare_command_pool_set(const cmdmap_t& cmdmap, ss << "pool size must be between 1 and 10"; return -EINVAL; } + if (n == 1) { + if (!g_conf().get_val<bool>("mon_allow_pool_size_one")) { + ss << "configuring pool size as 1 is disabled by default."; + return -EPERM; + } + bool sure = false; + cmd_getval(cmdmap, "yes_i_really_mean_it", sure); + if (!sure) { ss << "WARNING: setting pool size 1 could lead to data loss " + "without recovery. If you are *ABSOLUTELY CERTAIN* that is what you want, " + "pass the flag --yes-i-really-mean-it."; + return -EPERM; + } + } if (!osdmap.crush->check_crush_rule(p.get_crush_rule(), p.type, n, ss)) { return -EINVAL; } diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 636ab0c7156..1cfb85d11e1 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -31,6 +31,8 @@ using std::stringstream; using std::vector; using ceph::bufferlist; +using ceph::fixed_u_to_string; + using TOPNSPC::common::cmd_getval; MEMPOOL_DEFINE_OBJECT_FACTORY(PGMapDigest, pgmap_digest, pgmap); diff --git a/src/mon/PGMap.h b/src/mon/PGMap.h index d9b2c874c20..6488cc895c7 100644 --- a/src/mon/PGMap.h +++ b/src/mon/PGMap.h @@ -492,12 +492,12 @@ public: void get_filtered_pg_stats(uint64_t state, int64_t poolid, int64_t osdid, bool primary, std::set<pg_t>& pgs) const; - set<std::string> osd_parentage(const OSDMap& osdmap, int id) const; + std::set<std::string> osd_parentage(const OSDMap& osdmap, int id) const; void get_health_checks( CephContext *cct, const OSDMap& osdmap, health_check_map_t *checks) const; - void print_summary(ceph::Formatter *f, ostream *out) const; + void print_summary(ceph::Formatter *f, std::ostream *out) const; static void generate_test_instances(std::list<PGMap*>& o); }; diff --git a/src/mon/Session.h b/src/mon/Session.h index 3d190ae2602..4ca4814d700 100644 --- a/src/mon/Session.h +++ b/src/mon/Session.h @@ -110,7 +110,7 @@ struct MonSession : public RefCountedObject { return socket_addr; } - void dump(Formatter *f) const { + void dump(ceph::Formatter *f) const { f->dump_stream("name") << name; f->dump_stream("entity_name") << entity_name; f->dump_object("addrs", addrs); diff --git a/src/mon/health_check.h b/src/mon/health_check.h index bff9166b12d..1473c496eec 100644 --- a/src/mon/health_check.h +++ b/src/mon/health_check.h @@ -74,7 +74,7 @@ struct health_mute_t { std::string code; utime_t ttl; bool sticky = false; - string summary; + std::string summary; int64_t count; DENC(health_mute_t, v, p) { diff --git a/src/msg/DispatchQueue.cc b/src/msg/DispatchQueue.cc index 5a081591a59..b8ed6f7efe8 100644 --- a/src/msg/DispatchQueue.cc +++ b/src/msg/DispatchQueue.cc @@ -20,6 +20,8 @@ #define dout_subsys ceph_subsys_ms #include "common/debug.h" +using ceph::cref_t; +using ceph::ref_t; /******************* * DispatchQueue @@ -213,11 +215,9 @@ void DispatchQueue::entry() void DispatchQueue::discard_queue(uint64_t id) { std::lock_guard l{lock}; - list<QueueItem> removed; + std::list<QueueItem> removed; mqueue.remove_by_class(id, &removed); - for (list<QueueItem>::iterator i = removed.begin(); - i != removed.end(); - ++i) { + for (auto i = removed.begin(); i != removed.end(); ++i) { ceph_assert(!(i->is_code())); // We don't discard id 0, ever! const ref_t<Message>& m = i->get_message(); remove_arrival(m); diff --git a/src/msg/DispatchQueue.h b/src/msg/DispatchQueue.h index 243de2cba02..de0cb7d1a08 100644 --- a/src/msg/DispatchQueue.h +++ b/src/msg/DispatchQueue.h @@ -41,9 +41,9 @@ class DispatchQueue { class QueueItem { int type; ConnectionRef con; - ref_t<Message> m; + ceph::ref_t<Message> m; public: - explicit QueueItem(const ref_t<Message>& m) : type(-1), con(0), m(m) {} + explicit QueueItem(const ceph::ref_t<Message>& m) : type(-1), con(0), m(m) {} QueueItem(int type, Connection *con) : type(type), con(con), m(0) {} bool is_code() const { return type != -1; @@ -52,7 +52,7 @@ class DispatchQueue { ceph_assert(is_code()); return type; } - const ref_t<Message>& get_message() { + const ceph::ref_t<Message>& get_message() { ceph_assert(!is_code()); return m; } @@ -61,7 +61,7 @@ class DispatchQueue { return con.get(); } }; - + CephContext *cct; Messenger *msgr; mutable ceph::mutex lock; @@ -69,17 +69,17 @@ class DispatchQueue { PrioritizedQueue<QueueItem, uint64_t> mqueue; - std::set<pair<double, ref_t<Message>>> marrival; - map<ref_t<Message>, decltype(marrival)::iterator> marrival_map; - void add_arrival(const ref_t<Message>& m) { + std::set<std::pair<double, ceph::ref_t<Message>>> marrival; + std::map<ceph::ref_t<Message>, decltype(marrival)::iterator> marrival_map; + void add_arrival(const ceph::ref_t<Message>& m) { marrival_map.insert( make_pair( m, - marrival.insert(make_pair(m->get_recv_stamp(), m)).first + marrival.insert(std::make_pair(m->get_recv_stamp(), m)).first ) ); } - void remove_arrival(const ref_t<Message>& m) { + void remove_arrival(const ceph::ref_t<Message>& m) { auto it = marrival_map.find(m); ceph_assert(it != marrival_map.end()); marrival.erase(it->second); @@ -87,7 +87,7 @@ class DispatchQueue { } std::atomic<uint64_t> next_id; - + enum { D_CONNECT = 1, D_ACCEPT, D_BAD_REMOTE_RESET, D_BAD_RESET, D_CONN_REFUSED, D_NUM_CODES }; /** @@ -106,7 +106,7 @@ class DispatchQueue { ceph::mutex local_delivery_lock; ceph::condition_variable local_delivery_cond; bool stop_local_delivery; - std::queue<pair<ref_t<Message>, int>> local_messages; + std::queue<std::pair<ceph::ref_t<Message>, int>> local_messages; class LocalDeliveryThread : public Thread { DispatchQueue *dq; public: @@ -117,8 +117,8 @@ class DispatchQueue { } } local_delivery_thread; - uint64_t pre_dispatch(const ref_t<Message>& m); - void post_dispatch(const ref_t<Message>& m, uint64_t msize); + uint64_t pre_dispatch(const ceph::ref_t<Message>& m); + void post_dispatch(const ceph::ref_t<Message>& m, uint64_t msize); public: @@ -126,9 +126,9 @@ class DispatchQueue { Throttle dispatch_throttler; bool stop; - void local_delivery(const ref_t<Message>& m, int priority); + void local_delivery(const ceph::ref_t<Message>& m, int priority); void local_delivery(Message* m, int priority) { - return local_delivery(ref_t<Message>(m, false), priority); /* consume ref */ + return local_delivery(ceph::ref_t<Message>(m, false), priority); /* consume ref */ } void run_local_delivery(); @@ -197,15 +197,15 @@ class DispatchQueue { cond.notify_all(); } - bool can_fast_dispatch(const cref_t<Message> &m) const; - void fast_dispatch(const ref_t<Message>& m); + bool can_fast_dispatch(const ceph::cref_t<Message> &m) const; + void fast_dispatch(const ceph::ref_t<Message>& m); void fast_dispatch(Message* m) { - return fast_dispatch(ref_t<Message>(m, false)); /* consume ref */ + return fast_dispatch(ceph::ref_t<Message>(m, false)); /* consume ref */ } - void fast_preprocess(const ref_t<Message>& m); - void enqueue(const ref_t<Message>& m, int priority, uint64_t id); + void fast_preprocess(const ceph::ref_t<Message>& m); + void enqueue(const ceph::ref_t<Message>& m, int priority, uint64_t id); void enqueue(Message* m, int priority, uint64_t id) { - return enqueue(ref_t<Message>(m, false), priority, id); /* consume ref */ + return enqueue(ceph::ref_t<Message>(m, false), priority, id); /* consume ref */ } void discard_queue(uint64_t id); void discard_local(); @@ -218,7 +218,7 @@ class DispatchQueue { void shutdown(); bool is_started() const {return dispatch_thread.is_started();} - DispatchQueue(CephContext *cct, Messenger *msgr, string &name) + DispatchQueue(CephContext *cct, Messenger *msgr, std::string &name) : cct(cct), msgr(msgr), lock(ceph::make_mutex("Messenger::DispatchQueue::lock" + name)), mqueue(cct->_conf->ms_pq_max_tokens_per_priority, @@ -228,7 +228,7 @@ class DispatchQueue { local_delivery_lock(ceph::make_mutex("Messenger::DispatchQueue::local_delivery_lock" + name)), stop_local_delivery(false), local_delivery_thread(this), - dispatch_throttler(cct, string("msgr_dispatch_throttler-") + name, + dispatch_throttler(cct, std::string("msgr_dispatch_throttler-") + name, cct->_conf->ms_dispatch_throttle_bytes), stop(false) {} diff --git a/src/msg/Message.cc b/src/msg/Message.cc index c57bc3bc1bd..27ef95d9db0 100644 --- a/src/msg/Message.cc +++ b/src/msg/Message.cc @@ -288,9 +288,9 @@ void Message::encode(uint64_t features, int crcflags, bool skip_header_crc) } } -void Message::dump(Formatter *f) const +void Message::dump(ceph::Formatter *f) const { - stringstream ss; + std::stringstream ss; print(ss); f->dump_string("summary", ss.str()); } @@ -347,12 +347,14 @@ Message *decode_message(CephContext *cct, } // make message - ref_t<Message> m; + ceph::ref_t<Message> m; int type = header.type; switch (type) { // -- with payload -- + using ceph::make_message; + case MSG_PGSTATS: m = make_message<MPGStats>(); break; @@ -929,7 +931,7 @@ Message *decode_message(CephContext *cct, try { m->decode_payload(); } - catch (const buffer::error &e) { + catch (const ceph::buffer::error &e) { if (cct) { lderr(cct) << "failed to decode message of type " << type << " v" << header.version @@ -948,7 +950,7 @@ Message *decode_message(CephContext *cct, return m.detach(); } -void Message::encode_trace(bufferlist &bl, uint64_t features) const +void Message::encode_trace(ceph::bufferlist &bl, uint64_t features) const { using ceph::encode; auto p = trace.get_info(); @@ -959,7 +961,7 @@ void Message::encode_trace(bufferlist &bl, uint64_t features) const encode(*p, bl); } -void Message::decode_trace(bufferlist::const_iterator &p, bool create) +void Message::decode_trace(ceph::bufferlist::const_iterator &p, bool create) { blkin_trace_info info = {}; decode(info, p); @@ -992,7 +994,7 @@ void Message::decode_trace(bufferlist::const_iterator &p, bool create) // problems, we currently always encode and decode using the old footer format that doesn't // allow for message authentication. Eventually we should fix that. PLR -void encode_message(Message *msg, uint64_t features, bufferlist& payload) +void encode_message(Message *msg, uint64_t features, ceph::bufferlist& payload) { ceph_msg_footer_old old_footer; msg->encode(features, MSG_CRC_ALL); @@ -1006,6 +1008,7 @@ void encode_message(Message *msg, uint64_t features, bufferlist& payload) old_footer.flags = footer.flags; encode(old_footer, payload); + using ceph::encode; encode(msg->get_payload(), payload); encode(msg->get_middle(), payload); encode(msg->get_data(), payload); @@ -1016,12 +1019,12 @@ void encode_message(Message *msg, uint64_t features, bufferlist& payload) // We've slipped in a 0 signature at this point, so any signature checking after this will // fail. PLR -Message *decode_message(CephContext *cct, int crcflags, bufferlist::const_iterator& p) +Message *decode_message(CephContext *cct, int crcflags, ceph::bufferlist::const_iterator& p) { ceph_msg_header h; ceph_msg_footer_old fo; ceph_msg_footer f; - bufferlist fr, mi, da; + ceph::bufferlist fr, mi, da; decode(h, p); decode(fo, p); f.front_crc = fo.front_crc; @@ -1029,6 +1032,7 @@ Message *decode_message(CephContext *cct, int crcflags, bufferlist::const_iterat f.data_crc = fo.data_crc; f.flags = fo.flags; f.sig = 0; + using ceph::decode; decode(fr, p); decode(mi, p); decode(da, p); diff --git a/src/msg/Messenger.cc b/src/msg/Messenger.cc index 4e2ea96ebe2..464ba394666 100644 --- a/src/msg/Messenger.cc +++ b/src/msg/Messenger.cc @@ -10,7 +10,7 @@ #include "msg/async/AsyncMessenger.h" -Messenger *Messenger::create_client_messenger(CephContext *cct, string lname) +Messenger *Messenger::create_client_messenger(CephContext *cct, std::string lname) { std::string public_msgr_type = cct->_conf->ms_public_type.empty() ? cct->_conf.get_val<std::string>("ms_type") : cct->_conf->ms_public_type; auto nonce = get_random_nonce(); @@ -33,8 +33,8 @@ uint64_t Messenger::get_random_nonce() return ceph::util::generate_random_number<uint64_t>(); } -Messenger *Messenger::create(CephContext *cct, const string &type, - entity_name_t name, string lname, +Messenger *Messenger::create(CephContext *cct, const std::string &type, + entity_name_t name, std::string lname, uint64_t nonce, uint64_t cflags) { int r = -1; diff --git a/src/msg/Messenger.h b/src/msg/Messenger.h index c00374c114d..5ed44407c17 100644 --- a/src/msg/Messenger.h +++ b/src/msg/Messenger.h @@ -648,7 +648,7 @@ public: * * @param m The Message we are testing. */ - bool ms_can_fast_dispatch(const cref_t<Message>& m) { + bool ms_can_fast_dispatch(const ceph::cref_t<Message>& m) { for (const auto &dispatcher : fast_dispatchers) { if (dispatcher->ms_can_fast_dispatch2(m)) return true; @@ -662,7 +662,7 @@ public: * @param m The Message we are fast dispatching. * If none of our Dispatchers can handle it, ceph_abort(). */ - void ms_fast_dispatch(const ref_t<Message> &m) { + void ms_fast_dispatch(const ceph::ref_t<Message> &m) { m->set_dispatch_stamp(ceph_clock_now()); for (const auto &dispatcher : fast_dispatchers) { if (dispatcher->ms_can_fast_dispatch2(m)) { @@ -673,12 +673,12 @@ public: ceph_abort(); } void ms_fast_dispatch(Message *m) { - return ms_fast_dispatch(ref_t<Message>(m, false)); /* consume ref */ + return ms_fast_dispatch(ceph::ref_t<Message>(m, false)); /* consume ref */ } /** * */ - void ms_fast_preprocess(const ref_t<Message> &m) { + void ms_fast_preprocess(const ceph::ref_t<Message> &m) { for (const auto &dispatcher : fast_dispatchers) { dispatcher->ms_fast_preprocess2(m); } @@ -690,7 +690,7 @@ public: * * @param m The Message to deliver. */ - void ms_deliver_dispatch(const ref_t<Message> &m) { + void ms_deliver_dispatch(const ceph::ref_t<Message> &m) { m->set_dispatch_stamp(ceph_clock_now()); for (const auto &dispatcher : dispatchers) { if (dispatcher->ms_dispatch2(m)) @@ -701,7 +701,7 @@ public: ceph_assert(!cct->_conf->ms_die_on_unhandled_msg); } void ms_deliver_dispatch(Message *m) { - return ms_deliver_dispatch(ref_t<Message>(m, false)); /* consume ref */ + return ms_deliver_dispatch(ceph::ref_t<Message>(m, false)); /* consume ref */ } /** * Notify each Dispatcher of a new Connection. Call diff --git a/src/msg/QueueStrategy.cc b/src/msg/QueueStrategy.cc index 85b0a11e602..342494c5a7a 100644 --- a/src/msg/QueueStrategy.cc +++ b/src/msg/QueueStrategy.cc @@ -44,11 +44,11 @@ void QueueStrategy::ds_dispatch(Message *m) { void QueueStrategy::entry(QSThread *thrd) { for (;;) { - ref_t<Message> m; + ceph::ref_t<Message> m; std::unique_lock l{lock}; for (;;) { if (! mqueue.empty()) { - m = ref_t<Message>(&mqueue.front(), false); + m = ceph::ref_t<Message>(&mqueue.front(), false); mqueue.pop_front(); break; } @@ -98,7 +98,7 @@ void QueueStrategy::start() std::lock_guard l{lock}; threads.reserve(n_threads); for (int ix = 0; ix < n_threads; ++ix) { - string thread_name = "ms_qs_"; + std::string thread_name = "ms_qs_"; thread_name.append(std::to_string(ix)); auto thrd = std::make_unique<QSThread>(this); thrd->create(thread_name.c_str()); diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index 82ef1389734..b0adff91946 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -35,7 +35,7 @@ #define dout_subsys ceph_subsys_ms #undef dout_prefix #define dout_prefix _conn_prefix(_dout) -ostream& AsyncConnection::_conn_prefix(std::ostream *_dout) { +std::ostream& AsyncConnection::_conn_prefix(std::ostream *_dout) { return *_dout << "-- " << async_msgr->get_myaddrs() << " >> " << *peer_addrs << " conn(" << this << (msgr2 ? " msgr2=" : " legacy=") @@ -168,8 +168,8 @@ void AsyncConnection::maybe_start_delay_thread() if (!delay_state) { async_msgr->cct->_conf.with_val<std::string>( "ms_inject_delay_type", - [this](const string& s) { - if (s.find(ceph_entity_type_name(peer_type)) != string::npos) { + [this](const std::string& s) { + if (s.find(ceph_entity_type_name(peer_type)) != std::string::npos) { ldout(msgr->cct, 1) << __func__ << " setting up a delay queue" << dendl; delay_state = new DelayedDelivery(async_msgr, center, dispatch_queue, @@ -300,7 +300,7 @@ ssize_t AsyncConnection::read_bulk(char *buf, unsigned len) return nread; } -ssize_t AsyncConnection::write(bufferlist &bl, +ssize_t AsyncConnection::write(ceph::buffer::list &bl, std::function<void(ssize_t)> callback, bool more) { diff --git a/src/msg/async/AsyncConnection.h b/src/msg/async/AsyncConnection.h index 20d095dfafb..122a6c4089e 100644 --- a/src/msg/async/AsyncConnection.h +++ b/src/msg/async/AsyncConnection.h @@ -56,7 +56,7 @@ class AsyncConnection : public Connection { ssize_t read_until(unsigned needed, char *p); ssize_t read_bulk(char *buf, unsigned len); - ssize_t write(bufferlist &bl, std::function<void(ssize_t)> callback, + ssize_t write(ceph::buffer::list &bl, std::function<void(ssize_t)> callback, bool more=false); ssize_t _try_send(bool more=false); @@ -114,7 +114,7 @@ private: public: void maybe_start_delay_thread(); - ostream& _conn_prefix(std::ostream *_dout); + std::ostream& _conn_prefix(std::ostream *_dout); bool is_connected() override; @@ -182,7 +182,7 @@ private: DispatchQueue *dispatch_queue; // lockfree, only used in own thread - bufferlist outgoing_bl; + ceph::buffer::list outgoing_bl; bool open_write = false; std::mutex write_lock; @@ -197,7 +197,7 @@ private: uint32_t recv_max_prefetch; uint32_t recv_start; uint32_t recv_end; - set<uint64_t> register_time_events; // need to delete it if stop + std::set<uint64_t> register_time_events; // need to delete it if stop ceph::coarse_mono_clock::time_point last_connect_started; ceph::coarse_mono_clock::time_point last_active; ceph::mono_clock::time_point recv_start_time; diff --git a/src/msg/async/AsyncMessenger.cc b/src/msg/async/AsyncMessenger.cc index 4f1224284f2..6e989bca507 100644 --- a/src/msg/async/AsyncMessenger.cc +++ b/src/msg/async/AsyncMessenger.cc @@ -32,11 +32,11 @@ #define dout_subsys ceph_subsys_ms #undef dout_prefix #define dout_prefix _prefix(_dout, this) -static ostream& _prefix(std::ostream *_dout, AsyncMessenger *m) { +static std::ostream& _prefix(std::ostream *_dout, AsyncMessenger *m) { return *_dout << "-- " << m->get_myaddrs() << " "; } -static ostream& _prefix(std::ostream *_dout, Processor *p) { +static std::ostream& _prefix(std::ostream *_dout, Processor *p) { return *_dout << " Processor -- "; } @@ -60,7 +60,7 @@ Processor::Processor(AsyncMessenger *r, Worker *w, CephContext *c) listen_handler(new C_processor_accept(this)) {} int Processor::bind(const entity_addrvec_t &bind_addrs, - const set<int>& avoid_ports, + const std::set<int>& avoid_ports, entity_addrvec_t* bound_addrs) { const auto& conf = msgr->cct->_conf; @@ -278,7 +278,7 @@ class C_handle_reap : public EventCallback { */ AsyncMessenger::AsyncMessenger(CephContext *cct, entity_name_t name, - const std::string &type, string mname, uint64_t _nonce) + const std::string &type, std::string mname, uint64_t _nonce) : SimplePolicyMessenger(cct, name), dispatch_queue(cct, this, mname), nonce(_nonce) @@ -397,7 +397,7 @@ int AsyncMessenger::bindv(const entity_addrvec_t &bind_addrs) lock.unlock(); // bind to a socket - set<int> avoid_ports; + std::set<int> avoid_ports; entity_addrvec_t bound_addrs; unsigned i = 0; for (auto &&p : processors) { @@ -421,7 +421,7 @@ int AsyncMessenger::bindv(const entity_addrvec_t &bind_addrs) return 0; } -int AsyncMessenger::rebind(const set<int>& avoid_ports) +int AsyncMessenger::rebind(const std::set<int>& avoid_ports) { ldout(cct,1) << __func__ << " rebind avoid " << avoid_ports << dendl; ceph_assert(did_bind); @@ -437,7 +437,7 @@ int AsyncMessenger::rebind(const set<int>& avoid_ports) entity_addrvec_t bound_addrs; entity_addrvec_t bind_addrs = get_myaddrs(); - set<int> new_avoid(avoid_ports); + std::set<int> new_avoid(avoid_ports); for (auto& a : bind_addrs.v) { new_avoid.insert(a.get_port()); a.set_port(0); diff --git a/src/msg/async/AsyncMessenger.h b/src/msg/async/AsyncMessenger.h index 6e18281f1b9..83a9c5a9b77 100644 --- a/src/msg/async/AsyncMessenger.h +++ b/src/msg/async/AsyncMessenger.h @@ -44,9 +44,9 @@ class AsyncMessenger; */ class Processor { AsyncMessenger *msgr; - NetHandler net; + ceph::NetHandler net; Worker *worker; - vector<ServerSocket> listen_sockets; + std::vector<ServerSocket> listen_sockets; EventCallbackRef listen_handler; class C_processor_accept; @@ -57,7 +57,7 @@ class Processor { void stop(); int bind(const entity_addrvec_t &bind_addrs, - const set<int>& avoid_ports, + const std::set<int>& avoid_ports, entity_addrvec_t* bound_addrs); void start(); void accept(); @@ -82,7 +82,7 @@ public: * be a value that will be repeated if the daemon restarts. */ AsyncMessenger(CephContext *cct, entity_name_t name, const std::string &type, - string mname, uint64_t _nonce); + std::string mname, uint64_t _nonce); /** * Destroy the AsyncMessenger. Pretty simple since all the work is done @@ -115,7 +115,7 @@ public: } int bind(const entity_addr_t& bind_addr) override; - int rebind(const set<int>& avoid_ports) override; + int rebind(const std::set<int>& avoid_ports) override; int client_bind(const entity_addr_t& bind_addr) override; int bindv(const entity_addrvec_t& bind_addrs) override; @@ -268,10 +268,10 @@ private: * * These are not yet in the conns map. */ - set<AsyncConnectionRef> accepting_conns; + std::set<AsyncConnectionRef> accepting_conns; /// anonymous outgoing connections - set<AsyncConnectionRef> anon_conns; + std::set<AsyncConnectionRef> anon_conns; /** * list of connection are closed which need to be clean up @@ -285,7 +285,7 @@ private: * AsyncConnection in this set. */ ceph::mutex deleted_lock = ceph::make_mutex("AsyncMessenger::deleted_lock"); - set<AsyncConnectionRef> deleted_conns; + std::set<AsyncConnectionRef> deleted_conns; EventCallbackRef reap_handler; diff --git a/src/msg/async/Event.cc b/src/msg/async/Event.cc index 4d2fb339416..8e1cc15b30b 100644 --- a/src/msg/async/Event.cc +++ b/src/msg/async/Event.cc @@ -69,7 +69,7 @@ class C_handle_notify : public EventCallback { * about the poller. The name of the superclass is probably sufficient * for most cases. */ -EventCenter::Poller::Poller(EventCenter* center, const string& name) +EventCenter::Poller::Poller(EventCenter* center, const std::string& name) : owner(center), poller_name(name), slot(owner->pollers.size()) { owner->pollers.push_back(this); @@ -94,7 +94,7 @@ EventCenter::Poller::~Poller() slot = -1; } -ostream& EventCenter::_event_prefix(std::ostream *_dout) +std::ostream& EventCenter::_event_prefix(std::ostream *_dout) { return *_dout << "Event(" << this << " nevent=" << nevent << " time_id=" << time_event_next_id << ")."; @@ -248,7 +248,7 @@ int EventCenter::create_file_event(int fd, int mask, EventCallbackRef ctxt) event->write_cb = ctxt; } ldout(cct, 20) << __func__ << " create event end fd=" << fd << " mask=" << mask - << " original mask is " << event->mask << dendl; + << " current mask is " << event->mask << dendl; return 0; } @@ -281,7 +281,7 @@ void EventCenter::delete_file_event(int fd, int mask) event->mask = event->mask & (~mask); ldout(cct, 30) << __func__ << " delete event end fd=" << fd << " mask=" << mask - << " original mask is " << event->mask << dendl; + << " current mask is " << event->mask << dendl; } uint64_t EventCenter::create_time_event(uint64_t microseconds, EventCallbackRef ctxt) @@ -340,6 +340,7 @@ int EventCenter::process_time_events() { int processed = 0; clock_type::time_point now = clock_type::now(); + using ceph::operator <<; ldout(cct, 30) << __func__ << " cur time is " << now << dendl; while (!time_events.empty()) { @@ -388,7 +389,7 @@ int EventCenter::process_events(unsigned timeout_microseconds, ceph::timespan * tv.tv_usec = timeout_microseconds % 1000000; ldout(cct, 30) << __func__ << " wait second " << tv.tv_sec << " usec " << tv.tv_usec << dendl; - vector<FiredFileEvent> fired_events; + std::vector<FiredFileEvent> fired_events; numevents = driver->event_wait(fired_events, &tv); auto working_start = ceph::mono_clock::now(); for (int event_id = 0; event_id < numevents; event_id++) { @@ -422,7 +423,7 @@ int EventCenter::process_events(unsigned timeout_microseconds, ceph::timespan * if (external_num_events.load()) { external_lock.lock(); - deque<EventCallbackRef> cur_process; + std::deque<EventCallbackRef> cur_process; cur_process.swap(external_events); external_num_events.store(0); external_lock.unlock(); diff --git a/src/msg/async/Event.h b/src/msg/async/Event.h index 5d6d04c9e8e..1812db3cd9c 100644 --- a/src/msg/async/Event.h +++ b/src/msg/async/Event.h @@ -76,7 +76,7 @@ class EventDriver { virtual int init(EventCenter *center, int nevent) = 0; virtual int add_event(int fd, int cur_mask, int mask) = 0; virtual int del_event(int fd, int cur_mask, int del_mask) = 0; - virtual int event_wait(vector<FiredFileEvent> &fired_events, struct timeval *tp) = 0; + virtual int event_wait(std::vector<FiredFileEvent> &fired_events, struct timeval *tp) = 0; virtual int resize_events(int newsize) = 0; virtual bool need_wakeup() { return true; } }; @@ -121,7 +121,7 @@ class EventCenter { */ class Poller { public: - explicit Poller(EventCenter* center, const string& pollerName); + explicit Poller(EventCenter* center, const std::string& pollerName); virtual ~Poller(); /** @@ -142,7 +142,7 @@ class EventCenter { /// Human-readable string name given to the poller to make it /// easy to identify for debugging. For most pollers just passing /// in the subclass name probably makes sense. - string poller_name; + std::string poller_name; /// Index of this Poller in EventCenter::pollers. Allows deletion /// without having to scan all the entries in pollers. -1 means @@ -159,8 +159,8 @@ class EventCenter { pthread_t owner = 0; std::mutex external_lock; std::atomic_ulong external_num_events; - deque<EventCallbackRef> external_events; - vector<FileEvent> file_events; + std::deque<EventCallbackRef> external_events; + std::vector<FileEvent> file_events; EventDriver *driver; std::multimap<clock_type::time_point, TimeEvent> time_events; // Keeps track of all of the pollers currently defined. We don't @@ -171,7 +171,7 @@ class EventCenter { uint64_t time_event_next_id; int notify_receive_fd; int notify_send_fd; - NetHandler net; + ceph::NetHandler net; EventCallbackRef notify_handler; unsigned center_id; AssociatedCenters *global_centers = nullptr; @@ -190,7 +190,7 @@ class EventCenter { notify_receive_fd(-1), notify_send_fd(-1), net(c), notify_handler(NULL), center_id(0) { } ~EventCenter(); - ostream& _event_prefix(std::ostream *_dout); + std::ostream& _event_prefix(std::ostream *_dout); int init(int nevent, unsigned center_id, const std::string &type); void set_owner(); diff --git a/src/msg/async/EventEpoll.cc b/src/msg/async/EventEpoll.cc index 000aaf4fcbc..7ed5321dcda 100644 --- a/src/msg/async/EventEpoll.cc +++ b/src/msg/async/EventEpoll.cc @@ -116,7 +116,7 @@ int EpollDriver::resize_events(int newsize) return 0; } -int EpollDriver::event_wait(vector<FiredFileEvent> &fired_events, struct timeval *tvp) +int EpollDriver::event_wait(std::vector<FiredFileEvent> &fired_events, struct timeval *tvp) { int retval, numevents = 0; diff --git a/src/msg/async/EventEpoll.h b/src/msg/async/EventEpoll.h index 0221f90d34c..454ecbc34ff 100644 --- a/src/msg/async/EventEpoll.h +++ b/src/msg/async/EventEpoll.h @@ -42,7 +42,7 @@ class EpollDriver : public EventDriver { int add_event(int fd, int cur_mask, int add_mask) override; int del_event(int fd, int cur_mask, int del_mask) override; int resize_events(int newsize) override; - int event_wait(vector<FiredFileEvent> &fired_events, + int event_wait(std::vector<FiredFileEvent> &fired_events, struct timeval *tp) override; }; diff --git a/src/msg/async/EventSelect.cc b/src/msg/async/EventSelect.cc index fdee6ebc3c8..8957792bb93 100644 --- a/src/msg/async/EventSelect.cc +++ b/src/msg/async/EventSelect.cc @@ -67,7 +67,7 @@ int SelectDriver::resize_events(int newsize) return 0; } -int SelectDriver::event_wait(vector<FiredFileEvent> &fired_events, struct timeval *tvp) +int SelectDriver::event_wait(std::vector<FiredFileEvent> &fired_events, struct timeval *tvp) { int retval, numevents = 0; diff --git a/src/msg/async/EventSelect.h b/src/msg/async/EventSelect.h index 1b75da0b1b0..08af57bcfd2 100644 --- a/src/msg/async/EventSelect.h +++ b/src/msg/async/EventSelect.h @@ -35,7 +35,7 @@ class SelectDriver : public EventDriver { int add_event(int fd, int cur_mask, int add_mask) override; int del_event(int fd, int cur_mask, int del_mask) override; int resize_events(int newsize) override; - int event_wait(vector<FiredFileEvent> &fired_events, + int event_wait(std::vector<FiredFileEvent> &fired_events, struct timeval *tp) override; }; diff --git a/src/msg/async/PosixStack.cc b/src/msg/async/PosixStack.cc index 0fc344c2ff4..a7a7fc41dd0 100644 --- a/src/msg/async/PosixStack.cc +++ b/src/msg/async/PosixStack.cc @@ -38,13 +38,14 @@ #define dout_prefix *_dout << "PosixStack " class PosixConnectedSocketImpl final : public ConnectedSocketImpl { - NetHandler &handler; + ceph::NetHandler &handler; int _fd; entity_addr_t sa; bool connected; public: - explicit PosixConnectedSocketImpl(NetHandler &h, const entity_addr_t &sa, int f, bool connected) + explicit PosixConnectedSocketImpl(ceph::NetHandler &h, const entity_addr_t &sa, + int f, bool connected) : handler(h), _fd(f), sa(sa), connected(connected) {} int is_connected() override { @@ -106,7 +107,7 @@ class PosixConnectedSocketImpl final : public ConnectedSocketImpl { return (ssize_t)sent; } - ssize_t send(bufferlist &bl, bool more) override { + ssize_t send(ceph::buffer::list &bl, bool more) override { size_t sent_bytes = 0; auto pb = std::cbegin(bl.buffers()); uint64_t left_pbrs = bl.get_num_buffers(); @@ -138,7 +139,7 @@ class PosixConnectedSocketImpl final : public ConnectedSocketImpl { } if (sent_bytes) { - bufferlist swapped; + ceph::buffer::list swapped; if (sent_bytes < bl.length()) { bl.splice(sent_bytes, bl.length()-sent_bytes, &swapped); bl.swap(swapped); @@ -163,11 +164,11 @@ class PosixConnectedSocketImpl final : public ConnectedSocketImpl { }; class PosixServerSocketImpl : public ServerSocketImpl { - NetHandler &handler; + ceph::NetHandler &handler; int _fd; public: - explicit PosixServerSocketImpl(NetHandler &h, int f, + explicit PosixServerSocketImpl(ceph::NetHandler &h, int f, const entity_addr_t& listen_addr, unsigned slot) : ServerSocketImpl(listen_addr.get_type(), slot), handler(h), _fd(f) {} @@ -281,7 +282,7 @@ int PosixWorker::connect(const entity_addr_t &addr, const SocketOptions &opts, C return 0; } -PosixNetworkStack::PosixNetworkStack(CephContext *c, const string &t) +PosixNetworkStack::PosixNetworkStack(CephContext *c, const std::string &t) : NetworkStack(c, t) { } diff --git a/src/msg/async/PosixStack.h b/src/msg/async/PosixStack.h index f1aaccd4b82..4aed9dd6444 100644 --- a/src/msg/async/PosixStack.h +++ b/src/msg/async/PosixStack.h @@ -25,7 +25,7 @@ #include "Stack.h" class PosixWorker : public Worker { - NetHandler net; + ceph::NetHandler net; void initialize() override; public: PosixWorker(CephContext *c, unsigned i) @@ -38,10 +38,10 @@ class PosixWorker : public Worker { }; class PosixNetworkStack : public NetworkStack { - vector<std::thread> threads; + std::vector<std::thread> threads; public: - explicit PosixNetworkStack(CephContext *c, const string &t); + explicit PosixNetworkStack(CephContext *c, const std::string &t); void spawn_worker(unsigned i, std::function<void ()> &&func) override { threads.resize(i+1); diff --git a/src/msg/async/Protocol.h b/src/msg/async/Protocol.h index cccba183567..10436307ebf 100644 --- a/src/msg/async/Protocol.h +++ b/src/msg/async/Protocol.h @@ -47,7 +47,7 @@ public: }; using rx_buffer_t = - std::unique_ptr<buffer::ptr_node, buffer::ptr_node::disposer>; + std::unique_ptr<ceph::buffer::ptr_node, ceph::buffer::ptr_node::disposer>; template <class C> class CtRxNode : public Ct<C> { diff --git a/src/msg/async/ProtocolV1.cc b/src/msg/async/ProtocolV1.cc index 4560cb5a031..35dcb9d6582 100644 --- a/src/msg/async/ProtocolV1.cc +++ b/src/msg/async/ProtocolV1.cc @@ -15,7 +15,7 @@ #define dout_subsys ceph_subsys_ms #undef dout_prefix #define dout_prefix _conn_prefix(_dout) -ostream &ProtocolV1::_conn_prefix(std::ostream *_dout) { +std::ostream &ProtocolV1::_conn_prefix(std::ostream *_dout) { return *_dout << "--1- " << messenger->get_myaddrs() << " >> " << *connection->peer_addrs << " conn(" @@ -39,7 +39,7 @@ const int ASYNC_COALESCE_THRESHOLD = 256; using namespace std; -static void alloc_aligned_buffer(bufferlist &data, unsigned len, unsigned off) { +static void alloc_aligned_buffer(ceph::buffer::list &data, unsigned len, unsigned off) { // create a buffer to read into that matches the data alignment unsigned alloc_len = 0; unsigned left = len; @@ -51,7 +51,7 @@ static void alloc_aligned_buffer(bufferlist &data, unsigned len, unsigned off) { left -= head; } alloc_len += left; - bufferptr ptr(buffer::create_small_page_aligned(alloc_len)); + ceph::bufferptr ptr(ceph::buffer::create_small_page_aligned(alloc_len)); if (head) ptr.set_offset(CEPH_PAGE_SIZE - head); data.push_back(std::move(ptr)); } @@ -211,7 +211,7 @@ void ProtocolV1::fault() { } void ProtocolV1::send_message(Message *m) { - bufferlist bl; + ceph::buffer::list bl; uint64_t f = connection->get_features(); // TODO: Currently not all messages supports reencode like MOSDMap, so here @@ -249,7 +249,7 @@ void ProtocolV1::send_message(Message *m) { } void ProtocolV1::prepare_send_message(uint64_t features, Message *m, - bufferlist &bl) { + ceph::buffer::list &bl) { ldout(cct, 20) << __func__ << " m " << *m << dendl; // associate message with Connection (for benefit of encode_payload) @@ -315,7 +315,7 @@ void ProtocolV1::write_event() { auto start = ceph::mono_clock::now(); bool more; do { - bufferlist data; + ceph::buffer::list data; Message *m = _get_next_outgoing(&data); if (!m) { break; @@ -436,7 +436,7 @@ CtPtr ProtocolV1::read(CONTINUATION_RX_TYPE<ProtocolV1> &next, } CtPtr ProtocolV1::write(CONTINUATION_TX_TYPE<ProtocolV1> &next, - bufferlist &buffer) { + ceph::buffer::list &buffer) { ssize_t r = connection->write(buffer, [&next, this](int r) { next.setParams(r); CONTINUATION_RUN(next); @@ -749,7 +749,7 @@ CtPtr ProtocolV1::read_message_front() { unsigned front_len = current_header.front_len; if (front_len) { if (!front.length()) { - front.push_back(buffer::create(front_len)); + front.push_back(ceph::buffer::create(front_len)); } return READB(front_len, front.c_str(), handle_message_front); } @@ -774,7 +774,7 @@ CtPtr ProtocolV1::read_message_middle() { if (current_header.middle_len) { if (!middle.length()) { - middle.push_back(buffer::create(current_header.middle_len)); + middle.push_back(ceph::buffer::create(current_header.middle_len)); } return READB(current_header.middle_len, middle.c_str(), handle_message_middle); @@ -807,7 +807,7 @@ CtPtr ProtocolV1::read_message_data_prepare() { #if 0 // rx_buffers is broken by design... see // http://tracker.ceph.com/issues/22480 - map<ceph_tid_t, pair<bufferlist, int> >::iterator p = + map<ceph_tid_t, pair<ceph::buffer::list, int> >::iterator p = connection->rx_buffers.find(current_header.tid); if (p != connection->rx_buffers.end()) { ldout(cct, 10) << __func__ << " seleting rx buffer v " << p->second.second @@ -841,7 +841,7 @@ CtPtr ProtocolV1::read_message_data() { ldout(cct, 20) << __func__ << " msg_left=" << msg_left << dendl; if (msg_left > 0) { - bufferptr bp = data_blp.get_current_ptr(); + auto bp = data_blp.get_current_ptr(); unsigned read_len = std::min(bp.length(), msg_left); return READB(read_len, bp.c_str(), handle_message_data); @@ -858,7 +858,7 @@ CtPtr ProtocolV1::handle_message_data(char *buffer, int r) { return _fault(); } - bufferptr bp = data_blp.get_current_ptr(); + auto bp = data_blp.get_current_ptr(); unsigned read_len = std::min(bp.length(), msg_left); ceph_assert(read_len < static_cast<unsigned>(std::numeric_limits<int>::max())); @@ -1096,7 +1096,7 @@ void ProtocolV1::randomize_out_seq() { } } -ssize_t ProtocolV1::write_message(Message *m, bufferlist &bl, bool more) { +ssize_t ProtocolV1::write_message(Message *m, ceph::buffer::list &bl, bool more) { FUNCTRACE(cct); ceph_assert(connection->center->in_thread()); m->set_seq(++out_seq); @@ -1192,7 +1192,7 @@ void ProtocolV1::requeue_sent() { return; } - list<pair<bufferlist, Message *> > &rq = out_q[CEPH_MSG_PRIO_HIGHEST]; + list<pair<ceph::buffer::list, Message *> > &rq = out_q[CEPH_MSG_PRIO_HIGHEST]; out_seq -= sent.size(); while (!sent.empty()) { Message *m = sent.back(); @@ -1200,7 +1200,7 @@ void ProtocolV1::requeue_sent() { ldout(cct, 10) << __func__ << " " << *m << " for resend " << " (" << m->get_seq() << ")" << dendl; m->clear_payload(); - rq.push_front(make_pair(bufferlist(), m)); + rq.push_front(make_pair(ceph::buffer::list(), m)); } } @@ -1210,10 +1210,10 @@ uint64_t ProtocolV1::discard_requeued_up_to(uint64_t out_seq, uint64_t seq) { if (out_q.count(CEPH_MSG_PRIO_HIGHEST) == 0) { return seq; } - list<pair<bufferlist, Message *> > &rq = out_q[CEPH_MSG_PRIO_HIGHEST]; + list<pair<ceph::buffer::list, Message *> > &rq = out_q[CEPH_MSG_PRIO_HIGHEST]; uint64_t count = out_seq; while (!rq.empty()) { - pair<bufferlist, Message *> p = rq.front(); + pair<ceph::buffer::list, Message *> p = rq.front(); if (p.second->get_seq() == 0 || p.second->get_seq() > seq) break; ldout(cct, 10) << __func__ << " " << *(p.second) << " for resend seq " << p.second->get_seq() << " <= " << seq << ", discarding" @@ -1238,10 +1238,10 @@ void ProtocolV1::discard_out_queue() { (*p)->put(); } sent.clear(); - for (map<int, list<pair<bufferlist, Message *> > >::iterator p = + for (map<int, list<pair<ceph::buffer::list, Message *> > >::iterator p = out_q.begin(); p != out_q.end(); ++p) { - for (list<pair<bufferlist, Message *> >::iterator r = p->second.begin(); + for (list<pair<ceph::buffer::list, Message *> >::iterator r = p->second.begin(); r != p->second.end(); ++r) { ldout(cct, 20) << __func__ << " discard " << r->second << dendl; r->second->put(); @@ -1313,13 +1313,13 @@ void ProtocolV1::reset_recv_state() } } -Message *ProtocolV1::_get_next_outgoing(bufferlist *bl) { +Message *ProtocolV1::_get_next_outgoing(ceph::buffer::list *bl) { Message *m = 0; if (!out_q.empty()) { - map<int, list<pair<bufferlist, Message *> > >::reverse_iterator it = + map<int, list<pair<ceph::buffer::list, Message *> > >::reverse_iterator it = out_q.rbegin(); ceph_assert(!it->second.empty()); - list<pair<bufferlist, Message *> >::iterator p = it->second.begin(); + list<pair<ceph::buffer::list, Message *> >::iterator p = it->second.begin(); m = p->second; if (p->first.length() && bl) { assert(bl->length() == 0); @@ -1339,7 +1339,7 @@ CtPtr ProtocolV1::send_client_banner() { ldout(cct, 20) << __func__ << dendl; state = CONNECTING; - bufferlist bl; + ceph::buffer::list bl; bl.append(CEPH_BANNER, strlen(CEPH_BANNER)); return WRITE(bl, handle_client_banner_write); } @@ -1362,7 +1362,7 @@ CtPtr ProtocolV1::wait_server_banner() { ldout(cct, 20) << __func__ << dendl; - bufferlist myaddrbl; + ceph::buffer::list myaddrbl; unsigned banner_len = strlen(CEPH_BANNER); unsigned need_len = banner_len + sizeof(ceph_entity_addr) * 2; return READ(need_len, handle_server_banner_and_identify); @@ -1384,7 +1384,7 @@ CtPtr ProtocolV1::handle_server_banner_and_identify(char *buffer, int r) { return _fault(); } - bufferlist bl; + ceph::buffer::list bl; entity_addr_t paddr, peer_addr_for_me; bl.append(buffer + banner_len, sizeof(ceph_entity_addr) * 2); @@ -1392,7 +1392,7 @@ CtPtr ProtocolV1::handle_server_banner_and_identify(char *buffer, int r) { try { decode(paddr, p); decode(peer_addr_for_me, p); - } catch (const buffer::error &e) { + } catch (const ceph::buffer::error &e) { lderr(cct) << __func__ << " decode peer addr failed " << dendl; return _fault(); } @@ -1455,7 +1455,7 @@ CtPtr ProtocolV1::handle_server_banner_and_identify(char *buffer, int r) { } } - bufferlist myaddrbl; + ceph::buffer::list myaddrbl; encode(messenger->get_myaddr_legacy(), myaddrbl, 0); // legacy return WRITE(myaddrbl, handle_my_addr_write); } @@ -1481,7 +1481,7 @@ CtPtr ProtocolV1::send_connect_message() ldout(cct, 20) << __func__ << dendl; ceph_assert(messenger->auth_client); - bufferlist auth_bl; + ceph::buffer::list auth_bl; vector<uint32_t> preferred_modes; if (connection->peer_type != CEPH_ENTITY_TYPE_MON || @@ -1532,7 +1532,7 @@ CtPtr ProtocolV1::send_connect_message() CEPH_MSG_CONNECT_LOSSY; // this is fyi, actually, server decides! } - bufferlist bl; + ceph::buffer::list bl; bl.append((char *)&connect, sizeof(connect)); if (auth_bl.length()) { bl.append(auth_bl.c_str(), auth_bl.length()); @@ -1614,14 +1614,14 @@ CtPtr ProtocolV1::handle_connect_reply_auth(char *buffer, int r) { return _fault(); } - bufferlist authorizer_reply; + ceph::buffer::list authorizer_reply; authorizer_reply.append(buffer, connect_reply.authorizer_len); if (connection->peer_type != CEPH_ENTITY_TYPE_MON || messenger->get_myname().type() == CEPH_ENTITY_TYPE_MON) { auto am = auth_meta; bool more = (connect_reply.tag == CEPH_MSGR_TAG_CHALLENGE_AUTHORIZER); - bufferlist auth_retry_bl; + ceph::buffer::list auth_retry_bl; int r; connection->lock.unlock(); if (more) { @@ -1759,7 +1759,7 @@ CtPtr ProtocolV1::handle_ack_seq(char *buffer, int r) { << " vs out_seq " << out_seq << dendl; out_seq = discard_requeued_up_to(out_seq, newly_acked_seq); - bufferlist bl; + ceph::buffer::list bl; uint64_t s = in_seq; bl.append((char *)&s, sizeof(s)); @@ -1830,7 +1830,7 @@ CtPtr ProtocolV1::send_server_banner() { ldout(cct, 20) << __func__ << dendl; state = ACCEPTING; - bufferlist bl; + ceph::buffer::list bl; bl.append(CEPH_BANNER, strlen(CEPH_BANNER)); @@ -1883,14 +1883,14 @@ CtPtr ProtocolV1::handle_client_banner(char *buffer, int r) { return _fault(); } - bufferlist addr_bl; + ceph::buffer::list addr_bl; entity_addr_t peer_addr; addr_bl.append(buffer + strlen(CEPH_BANNER), sizeof(ceph_entity_addr)); try { auto ti = addr_bl.cbegin(); decode(peer_addr, ti); - } catch (const buffer::error &e) { + } catch (const ceph::buffer::error &e) { lderr(cct) << __func__ << " decode peer_addr failed " << dendl; return _fault(); } @@ -1941,7 +1941,7 @@ CtPtr ProtocolV1::handle_connect_message_1(char *buffer, int r) { CtPtr ProtocolV1::wait_connect_message_auth() { ldout(cct, 20) << __func__ << dendl; authorizer_buf.clear(); - authorizer_buf.push_back(buffer::create(connect_msg.authorizer_len)); + authorizer_buf.push_back(ceph::buffer::create(connect_msg.authorizer_len)); return READB(connect_msg.authorizer_len, authorizer_buf.c_str(), handle_connect_message_auth); } @@ -1977,7 +1977,7 @@ CtPtr ProtocolV1::handle_connect_message_2() { << dendl; ceph_msg_connect_reply reply; - bufferlist authorizer_reply; + ceph::buffer::list authorizer_reply; // FIPS zeroization audit 20191115: this memset is not security related. memset(&reply, 0, sizeof(reply)); @@ -2026,7 +2026,7 @@ CtPtr ProtocolV1::handle_connect_message_2() { authorizer_reply); } - bufferlist auth_bl_copy = authorizer_buf; + ceph::buffer::list auth_bl_copy = authorizer_buf; auto am = auth_meta; am->auth_method = connect_msg.authorizer_protocol; connection->lock.unlock(); @@ -2274,9 +2274,9 @@ CtPtr ProtocolV1::handle_connect_message_2() { CtPtr ProtocolV1::send_connect_message_reply(char tag, ceph_msg_connect_reply &reply, - bufferlist &authorizer_reply) { + ceph::buffer::list &authorizer_reply) { ldout(cct, 20) << __func__ << dendl; - bufferlist reply_bl; + ceph::buffer::list reply_bl; reply.tag = tag; reply.features = ((uint64_t)connect_msg.features & connection->policy.features_supported) | @@ -2314,7 +2314,7 @@ CtPtr ProtocolV1::handle_connect_message_reply_write(int r) { CtPtr ProtocolV1::replace(const AsyncConnectionRef& existing, ceph_msg_connect_reply &reply, - bufferlist &authorizer_reply) { + ceph::buffer::list &authorizer_reply) { ldout(cct, 10) << __func__ << " accept replacing " << existing << dendl; connection->inject_delay(); @@ -2447,7 +2447,7 @@ CtPtr ProtocolV1::replace(const AsyncConnectionRef& existing, } CtPtr ProtocolV1::open(ceph_msg_connect_reply &reply, - bufferlist &authorizer_reply) { + ceph::buffer::list &authorizer_reply) { ldout(cct, 20) << __func__ << dendl; connect_seq = connect_msg.connect_seq + 1; @@ -2491,7 +2491,7 @@ CtPtr ProtocolV1::open(ceph_msg_connect_reply &reply, auth_meta->session_key, connection->get_features())); - bufferlist reply_bl; + ceph::buffer::list reply_bl; reply_bl.append((char *)&reply, sizeof(reply)); if (reply.authorizer_len) { diff --git a/src/msg/async/ProtocolV1.h b/src/msg/async/ProtocolV1.h index 3f63a68b2e5..b23860e8a01 100644 --- a/src/msg/async/ProtocolV1.h +++ b/src/msg/async/ProtocolV1.h @@ -104,9 +104,9 @@ protected: enum class WriteStatus { NOWRITE, REPLACING, CANWRITE, CLOSED }; std::atomic<WriteStatus> can_write; - std::list<Message *> sent; // the first bufferlist need to inject seq + std::list<Message *> sent; // the first ceph::buffer::list need to inject seq // priority queue for outbound msgs - std::map<int, std::list<std::pair<bufferlist, Message *>>> out_q; + std::map<int, std::list<std::pair<ceph::buffer::list, Message *>>> out_q; bool keepalive; bool write_in_progress = false; @@ -120,8 +120,8 @@ protected: // Open state ceph_msg_connect connect_msg; ceph_msg_connect_reply connect_reply; - bufferlist authorizer_buf; // auth(orizer) payload read off the wire - bufferlist authorizer_more; // connect-side auth retry (we added challenge) + ceph::buffer::list authorizer_buf; // auth(orizer) payload read off the wire + ceph::buffer::list authorizer_more; // connect-side auth retry (we added challenge) utime_t backoff; // backoff time utime_t recv_stamp; @@ -129,9 +129,9 @@ protected: unsigned msg_left; uint64_t cur_msg_size; ceph_msg_header current_header; - bufferlist data_buf; - bufferlist::iterator data_blp; - bufferlist front, middle, data; + ceph::buffer::list data_buf; + ceph::buffer::list::iterator data_blp; + ceph::buffer::list front, middle, data; bool replacing; // when replacing process happened, we will reply connect // side with RETRY tag and accept side will clear replaced @@ -147,7 +147,7 @@ protected: void run_continuation(CtPtr pcontinuation); CtPtr read(CONTINUATION_RX_TYPE<ProtocolV1> &next, int len, char *buffer = nullptr); - CtPtr write(CONTINUATION_TX_TYPE<ProtocolV1> &next,bufferlist &bl); + CtPtr write(CONTINUATION_TX_TYPE<ProtocolV1> &next,ceph::buffer::list &bl); inline CtPtr _fault() { // helper fault method that stops continuation fault(); return nullptr; @@ -194,10 +194,10 @@ protected: void session_reset(); void randomize_out_seq(); - Message *_get_next_outgoing(bufferlist *bl); + Message *_get_next_outgoing(ceph::buffer::list *bl); - void prepare_send_message(uint64_t features, Message *m, bufferlist &bl); - ssize_t write_message(Message *m, bufferlist &bl, bool more); + void prepare_send_message(uint64_t features, Message *m, ceph::buffer::list &bl); + ssize_t write_message(Message *m, ceph::buffer::list &bl, bool more); void requeue_sent(); uint64_t discard_requeued_up_to(uint64_t out_seq, uint64_t seq); @@ -206,7 +206,7 @@ protected: void reset_recv_state(); void reset_security(); - ostream &_conn_prefix(std::ostream *_dout); + std::ostream& _conn_prefix(std::ostream *_dout); public: ProtocolV1(AsyncConnection *connection); @@ -282,11 +282,11 @@ protected: CtPtr handle_connect_message_auth(char *buffer, int r); CtPtr handle_connect_message_2(); CtPtr send_connect_message_reply(char tag, ceph_msg_connect_reply &reply, - bufferlist &authorizer_reply); + ceph::buffer::list &authorizer_reply); CtPtr handle_connect_message_reply_write(int r); CtPtr replace(const AsyncConnectionRef& existing, ceph_msg_connect_reply &reply, - bufferlist &authorizer_reply); - CtPtr open(ceph_msg_connect_reply &reply, bufferlist &authorizer_reply); + ceph::buffer::list &authorizer_reply); + CtPtr open(ceph_msg_connect_reply &reply, ceph::buffer::list &authorizer_reply); CtPtr handle_ready_connect_message_reply_write(int r); CtPtr wait_seq(); CtPtr handle_seq(char *buffer, int r); diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index 8fc02db6e55..36aa16cc5f3 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -16,7 +16,7 @@ #define dout_subsys ceph_subsys_ms #undef dout_prefix #define dout_prefix _conn_prefix(_dout) -ostream &ProtocolV2::_conn_prefix(std::ostream *_dout) { +std::ostream &ProtocolV2::_conn_prefix(std::ostream *_dout) { return *_dout << "--2- " << messenger->get_myaddrs() << " >> " << *connection->peer_addrs << " conn(" << connection << " " << this @@ -43,7 +43,7 @@ void ProtocolV2::run_continuation(CtPtr pcontinuation) { void ProtocolV2::run_continuation(CtRef continuation) { try { CONTINUATION_RUN(continuation) - } catch (const buffer::error &e) { + } catch (const ceph::buffer::error &e) { lderr(cct) << __func__ << " failed decoding of frame header: " << e << dendl; _fault(); @@ -57,7 +57,7 @@ void ProtocolV2::run_continuation(CtRef continuation) { #define WRITE(B, D, C) write(D, CONTINUATION(C), B) -#define READ(L, C) read(CONTINUATION(C), buffer::ptr_node::create(buffer::create(L))) +#define READ(L, C) read(CONTINUATION(C), ceph::buffer::ptr_node::create(ceph::buffer::create(L))) #define READ_RXBUF(B, C) read(CONTINUATION(C), B) @@ -119,7 +119,7 @@ bool ProtocolV2::is_connected() { return can_write; } void ProtocolV2::discard_out_queue() { ldout(cct, 10) << __func__ << " started" << dendl; - for (list<Message *>::iterator p = sent.begin(); p != sent.end(); ++p) { + for (auto p = sent.begin(); p != sent.end(); ++p) { ldout(cct, 20) << __func__ << " discard " << *p << dendl; (*p)->put(); } @@ -775,7 +775,7 @@ CtPtr ProtocolV2::write(const std::string &desc, CtPtr ProtocolV2::write(const std::string &desc, CONTINUATION_TYPE<ProtocolV2> &next, - bufferlist &buffer) { + ceph::bufferlist &buffer) { if (unlikely(pre_auth.enabled)) { pre_auth.txbuf.append(buffer); ceph_assert(!cct->_conf->ms_die_on_bug || @@ -809,11 +809,12 @@ CtPtr ProtocolV2::_banner_exchange(CtRef callback) { ldout(cct, 20) << __func__ << dendl; bannerExchangeCallback = &callback; - bufferlist banner_payload; + ceph::bufferlist banner_payload; + using ceph::encode; encode((uint64_t)CEPH_MSGR2_SUPPORTED_FEATURES, banner_payload, 0); encode((uint64_t)CEPH_MSGR2_REQUIRED_FEATURES, banner_payload, 0); - bufferlist bl; + ceph::bufferlist bl; bl.append(CEPH_BANNER_V2_PREFIX, strlen(CEPH_BANNER_V2_PREFIX)); encode((uint16_t)banner_payload.length(), bl, 0); bl.claim_append(banner_payload); @@ -850,14 +851,15 @@ CtPtr ProtocolV2::_handle_peer_banner(rx_buffer_t &&buffer, int r) { } uint16_t payload_len; - bufferlist bl; + ceph::bufferlist bl; buffer->set_offset(banner_prefix_len); buffer->set_length(sizeof(ceph_le16)); bl.push_back(std::move(buffer)); auto ti = bl.cbegin(); + using ceph::decode; try { decode(payload_len, ti); - } catch (const buffer::error &e) { + } catch (const ceph::buffer::error &e) { lderr(cct) << __func__ << " decode banner payload len failed " << dendl; return _fault(); } @@ -879,13 +881,14 @@ CtPtr ProtocolV2::_handle_peer_banner_payload(rx_buffer_t &&buffer, int r) { uint64_t peer_supported_features; uint64_t peer_required_features; - bufferlist bl; + ceph::bufferlist bl; + using ceph::decode; bl.push_back(std::move(buffer)); auto ti = bl.cbegin(); try { decode(peer_supported_features, ti); decode(peer_required_features, ti); - } catch (const buffer::error &e) { + } catch (const ceph::buffer::error &e) { lderr(cct) << __func__ << " decode banner payload failed " << dendl; return _fault(); } @@ -1178,7 +1181,7 @@ CtPtr ProtocolV2::read_frame_segment() { const auto& cur_rx_desc = rx_segments_desc.at(rx_segments_data.size()); rx_buffer_t rx_buffer; try { - rx_buffer = buffer::ptr_node::create(buffer::create_aligned( + rx_buffer = ceph::buffer::ptr_node::create(ceph::buffer::create_aligned( get_onwire_size(cur_rx_desc.length), cur_rx_desc.alignment)); } catch (std::bad_alloc&) { // Catching because of potential issues with satisfying alignment. @@ -1745,8 +1748,8 @@ CtPtr ProtocolV2::send_auth_request(std::vector<uint32_t> &allowed_methods) { ldout(cct, 20) << __func__ << " peer_type " << (int)connection->peer_type << " auth_client " << messenger->auth_client << dendl; - bufferlist bl; - vector<uint32_t> preferred_modes; + ceph::bufferlist bl; + std::vector<uint32_t> preferred_modes; auto am = auth_meta; connection->lock.unlock(); int r = messenger->auth_client->get_auth_request( @@ -2203,12 +2206,12 @@ CtPtr ProtocolV2::_auth_bad_method(int r) return WRITE(bad_method, "bad auth method", read_frame); } -CtPtr ProtocolV2::_handle_auth_request(bufferlist& auth_payload, bool more) +CtPtr ProtocolV2::_handle_auth_request(ceph::bufferlist& auth_payload, bool more) { if (!messenger->auth_server) { return _fault(); } - bufferlist reply; + ceph::bufferlist reply; auto am = auth_meta; connection->lock.unlock(); int r = messenger->auth_server->handle_auth_request( diff --git a/src/msg/async/ProtocolV2.h b/src/msg/async/ProtocolV2.h index 2dbe647ae54..75d9b0016aa 100644 --- a/src/msg/async/ProtocolV2.h +++ b/src/msg/async/ProtocolV2.h @@ -115,7 +115,7 @@ private: bool keepalive; bool write_in_progress = false; - ostream &_conn_prefix(std::ostream *_dout); + std::ostream& _conn_prefix(std::ostream *_dout); void run_continuation(Ct<ProtocolV2> *pcontinuation); void run_continuation(Ct<ProtocolV2> &continuation); @@ -127,7 +127,7 @@ private: F &frame); Ct<ProtocolV2> *write(const std::string &desc, CONTINUATION_TYPE<ProtocolV2> &next, - bufferlist &buffer); + ceph::bufferlist &buffer); void requeue_sent(); uint64_t discard_requeued_up_to(uint64_t out_seq, uint64_t seq); @@ -239,7 +239,7 @@ private: Ct<ProtocolV2> *post_server_banner_exchange(); Ct<ProtocolV2> *handle_auth_request(ceph::bufferlist &payload); Ct<ProtocolV2> *handle_auth_request_more(ceph::bufferlist &payload); - Ct<ProtocolV2> *_handle_auth_request(bufferlist& auth_payload, bool more); + Ct<ProtocolV2> *_handle_auth_request(ceph::bufferlist& auth_payload, bool more); Ct<ProtocolV2> *_auth_bad_method(int r); Ct<ProtocolV2> *handle_client_ident(ceph::bufferlist &payload); Ct<ProtocolV2> *handle_ident_missing_features_write(int r); diff --git a/src/msg/async/Stack.cc b/src/msg/async/Stack.cc index 6b18d1de9cb..74d07829be9 100644 --- a/src/msg/async/Stack.cc +++ b/src/msg/async/Stack.cc @@ -63,7 +63,8 @@ std::function<void ()> NetworkStack::add_thread(unsigned worker_id) }; } -std::shared_ptr<NetworkStack> NetworkStack::create(CephContext *c, const string &t) +std::shared_ptr<NetworkStack> NetworkStack::create(CephContext *c, + const std::string &t) { if (t == "posix") return std::make_shared<PosixNetworkStack>(c, t); @@ -82,7 +83,7 @@ std::shared_ptr<NetworkStack> NetworkStack::create(CephContext *c, const string return nullptr; } -Worker* NetworkStack::create_worker(CephContext *c, const string &type, unsigned worker_id) +Worker* NetworkStack::create_worker(CephContext *c, const std::string &type, unsigned worker_id) { if (type == "posix") return new PosixWorker(c, worker_id); @@ -101,7 +102,7 @@ Worker* NetworkStack::create_worker(CephContext *c, const string &type, unsigned return nullptr; } -NetworkStack::NetworkStack(CephContext *c, const string &t): type(t), started(false), cct(c) +NetworkStack::NetworkStack(CephContext *c, const std:: string &t): type(t), started(false), cct(c) { ceph_assert(cct->_conf->ms_async_op_threads > 0); diff --git a/src/msg/async/Stack.h b/src/msg/async/Stack.h index 37a33163d6b..7b8b62f36fb 100644 --- a/src/msg/async/Stack.h +++ b/src/msg/async/Stack.h @@ -28,7 +28,7 @@ class ConnectedSocketImpl { virtual ~ConnectedSocketImpl() {} virtual int is_connected() = 0; virtual ssize_t read(char*, size_t) = 0; - virtual ssize_t send(bufferlist &bl, bool more) = 0; + virtual ssize_t send(ceph::buffer::list &bl, bool more) = 0; virtual void shutdown() = 0; virtual void close() = 0; virtual int fd() const = 0; @@ -96,7 +96,7 @@ class ConnectedSocket { /// Gets the output stream. /// /// Gets an object that sends data to the remote endpoint. - ssize_t send(bufferlist &bl, bool more) { + ssize_t send(ceph::buffer::list &bl, bool more) { return _csi->send(bl, more); } /// Disables output to the socket. @@ -302,9 +302,9 @@ class NetworkStack { protected: CephContext *cct; - vector<Worker*> workers; + std::vector<Worker*> workers; - explicit NetworkStack(CephContext *c, const string &t); + explicit NetworkStack(CephContext *c, const std::string &t); public: NetworkStack(const NetworkStack &) = delete; NetworkStack& operator=(const NetworkStack &) = delete; @@ -314,10 +314,10 @@ class NetworkStack { } static std::shared_ptr<NetworkStack> create( - CephContext *c, const string &type); + CephContext *c, const std::string &type); static Worker* create_worker( - CephContext *c, const string &t, unsigned i); + CephContext *c, const std::string &t, unsigned i); // backend need to override this method if backend doesn't support shared // listen table. // For example, posix backend has in kernel global listen table. If one diff --git a/src/msg/async/frames_v2.h b/src/msg/async/frames_v2.h index ddc42a489cf..2f187ceb769 100644 --- a/src/msg/async/frames_v2.h +++ b/src/msg/async/frames_v2.h @@ -403,14 +403,14 @@ protected: struct AuthRequestFrame : public ControlFrame<AuthRequestFrame, uint32_t, // auth method - vector<uint32_t>, // preferred modes + std::vector<uint32_t>, // preferred modes bufferlist> { // auth payload static const Tag tag = Tag::AUTH_REQUEST; using ControlFrame::Encode; using ControlFrame::Decode; inline uint32_t &method() { return get_val<0>(); } - inline vector<uint32_t> &preferred_modes() { return get_val<1>(); } + inline std::vector<uint32_t> &preferred_modes() { return get_val<1>(); } inline bufferlist &auth_payload() { return get_val<2>(); } protected: diff --git a/src/msg/async/rdma/Infiniband.cc b/src/msg/async/rdma/Infiniband.cc index e2c06229f41..52323f948c6 100644 --- a/src/msg/async/rdma/Infiniband.cc +++ b/src/msg/async/rdma/Infiniband.cc @@ -579,7 +579,7 @@ int Infiniband::CompletionChannel::init() << cpp_strerror(errno) << dendl; return -1; } - int rc = NetHandler(cct).set_nonblock(channel->fd); + int rc = ceph::NetHandler(cct).set_nonblock(channel->fd); if (rc < 0) { ibv_destroy_comp_channel(channel); return -1; @@ -1062,7 +1062,7 @@ void Infiniband::init() device->binding_port(cct, port_num); ib_physical_port = device->active_port->get_port_num(); pd = new ProtectionDomain(cct, device); - ceph_assert(NetHandler(cct).set_nonblock(device->ctxt->async_fd) == 0); + ceph_assert(ceph::NetHandler(cct).set_nonblock(device->ctxt->async_fd) == 0); support_srq = cct->_conf->ms_async_rdma_support_srq; if (support_srq) { diff --git a/src/msg/async/rdma/Infiniband.h b/src/msg/async/rdma/Infiniband.h index 3af89f304fe..03e59e7ac17 100644 --- a/src/msg/async/rdma/Infiniband.h +++ b/src/msg/async/rdma/Infiniband.h @@ -549,7 +549,7 @@ class Infiniband { uint32_t max_recv_wr; uint32_t q_key; bool dead; - vector<Chunk*> recv_queue; + std::vector<Chunk*> recv_queue; ceph::mutex lock = ceph::make_mutex("queue_pair_lock"); }; diff --git a/src/msg/async/rdma/RDMAConnectedSocketImpl.cc b/src/msg/async/rdma/RDMAConnectedSocketImpl.cc index c897f94f4d5..5e75e961d18 100644 --- a/src/msg/async/rdma/RDMAConnectedSocketImpl.cc +++ b/src/msg/async/rdma/RDMAConnectedSocketImpl.cc @@ -47,8 +47,8 @@ class C_handle_connection_read : public EventCallback { #undef dout_prefix #define dout_prefix *_dout << " RDMAConnectedSocketImpl " -RDMAConnectedSocketImpl::RDMAConnectedSocketImpl(CephContext *cct, shared_ptr<Infiniband> &ib, - shared_ptr<RDMADispatcher>& rdma_dispatcher, +RDMAConnectedSocketImpl::RDMAConnectedSocketImpl(CephContext *cct, std::shared_ptr<Infiniband> &ib, + std::shared_ptr<RDMADispatcher>& rdma_dispatcher, RDMAWorker *w) : cct(cct), connected(0), error(0), ib(ib), dispatcher(rdma_dispatcher), worker(w), @@ -129,7 +129,7 @@ int RDMAConnectedSocketImpl::activate() int RDMAConnectedSocketImpl::try_connect(const entity_addr_t& peer_addr, const SocketOptions &opts) { ldout(cct, 20) << __func__ << " nonblock:" << opts.nonblock << ", nodelay:" << opts.nodelay << ", rbuf_size: " << opts.rcbuf_size << dendl; - NetHandler net(cct); + ceph::NetHandler net(cct); // we construct a socket to transport ib sync message // but we shouldn't block in tcp connecting @@ -337,7 +337,7 @@ ssize_t RDMAConnectedSocketImpl::read_buffers(char* buf, size_t len) return read_size; } -ssize_t RDMAConnectedSocketImpl::send(bufferlist &bl, bool more) +ssize_t RDMAConnectedSocketImpl::send(ceph::buffer::list &bl, bool more) { if (error) { if (!active) @@ -440,7 +440,7 @@ ssize_t RDMAConnectedSocketImpl::submit(bool more) if (total_copied == 0) return -EAGAIN; ceph_assert(total_copied <= pending_bl.length()); - bufferlist swapped; + ceph::buffer::list swapped; if (total_copied < pending_bl.length()) { worker->perf_logger->inc(l_msgr_rdma_tx_parital_mem); pending_bl.splice(total_copied, pending_bl.length() - total_copied, &swapped); @@ -463,7 +463,7 @@ ssize_t RDMAConnectedSocketImpl::submit(bool more) int RDMAConnectedSocketImpl::post_work_request(std::vector<Chunk*> &tx_buffers) { ldout(cct, 20) << __func__ << " QP: " << local_qpn << " " << tx_buffers[0] << dendl; - vector<Chunk*>::iterator current_buffer = tx_buffers.begin(); + auto current_buffer = tx_buffers.begin(); ibv_sge isge[tx_buffers.size()]; uint32_t current_sge = 0; ibv_send_wr iswr[tx_buffers.size()]; diff --git a/src/msg/async/rdma/RDMAIWARPConnectedSocketImpl.cc b/src/msg/async/rdma/RDMAIWARPConnectedSocketImpl.cc index d55ced3c53f..606dbd2817c 100644 --- a/src/msg/async/rdma/RDMAIWARPConnectedSocketImpl.cc +++ b/src/msg/async/rdma/RDMAIWARPConnectedSocketImpl.cc @@ -7,8 +7,8 @@ #define TIMEOUT_MS 3000 #define RETRY_COUNT 7 -RDMAIWARPConnectedSocketImpl::RDMAIWARPConnectedSocketImpl(CephContext *cct, shared_ptr<Infiniband>& ib, - shared_ptr<RDMADispatcher>& rdma_dispatcher, +RDMAIWARPConnectedSocketImpl::RDMAIWARPConnectedSocketImpl(CephContext *cct, std::shared_ptr<Infiniband>& ib, + std::shared_ptr<RDMADispatcher>& rdma_dispatcher, RDMAWorker *w, RDMACMInfo *info) : RDMAConnectedSocketImpl(cct, ib, rdma_dispatcher, w), cm_con_handler(new C_handle_cm_connection(this)) { diff --git a/src/msg/async/rdma/RDMAIWARPServerSocketImpl.cc b/src/msg/async/rdma/RDMAIWARPServerSocketImpl.cc index e4a170ee8be..0500b4420f9 100644 --- a/src/msg/async/rdma/RDMAIWARPServerSocketImpl.cc +++ b/src/msg/async/rdma/RDMAIWARPServerSocketImpl.cc @@ -8,8 +8,8 @@ #define dout_prefix *_dout << " RDMAIWARPServerSocketImpl " RDMAIWARPServerSocketImpl::RDMAIWARPServerSocketImpl( - CephContext *cct, shared_ptr<Infiniband>& ib, - shared_ptr<RDMADispatcher>& rdma_dispatcher, RDMAWorker *w, + CephContext *cct, std::shared_ptr<Infiniband>& ib, + std::shared_ptr<RDMADispatcher>& rdma_dispatcher, RDMAWorker *w, entity_addr_t& a, unsigned addr_slot) : RDMAServerSocketImpl(cct, ib, rdma_dispatcher, w, a, addr_slot) { diff --git a/src/msg/async/rdma/RDMAServerSocketImpl.cc b/src/msg/async/rdma/RDMAServerSocketImpl.cc index cc85832eddd..99d12131ffb 100644 --- a/src/msg/async/rdma/RDMAServerSocketImpl.cc +++ b/src/msg/async/rdma/RDMAServerSocketImpl.cc @@ -25,8 +25,8 @@ #define dout_prefix *_dout << " RDMAServerSocketImpl " RDMAServerSocketImpl::RDMAServerSocketImpl( - CephContext *cct, shared_ptr<Infiniband>& ib, - shared_ptr<RDMADispatcher>& rdma_dispatcher, + CephContext *cct, std::shared_ptr<Infiniband>& ib, + std::shared_ptr<RDMADispatcher>& rdma_dispatcher, RDMAWorker *w, entity_addr_t& a, unsigned slot) : ServerSocketImpl(a.get_type(), slot), cct(cct), net(cct), server_setup_socket(-1), ib(ib), diff --git a/src/msg/async/rdma/RDMAStack.cc b/src/msg/async/rdma/RDMAStack.cc index b68aeb1a8ef..5e88e7d01dd 100644 --- a/src/msg/async/rdma/RDMAStack.cc +++ b/src/msg/async/rdma/RDMAStack.cc @@ -40,7 +40,7 @@ RDMADispatcher::~RDMADispatcher() ceph_assert(dead_queue_pairs.empty()); } -RDMADispatcher::RDMADispatcher(CephContext* c, shared_ptr<Infiniband>& ib) +RDMADispatcher::RDMADispatcher(CephContext* c, std::shared_ptr<Infiniband>& ib) : cct(c), ib(ib) { PerfCountersBuilder plb(cct, "AsyncMessenger::RDMADispatcher", l_msgr_rdma_dispatcher_first, l_msgr_rdma_dispatcher_last); @@ -772,9 +772,9 @@ void RDMAWorker::handle_pending_message() dispatcher->notify_pending_workers(); } -RDMAStack::RDMAStack(CephContext *cct, const string &t) - : NetworkStack(cct, t), ib(make_shared<Infiniband>(cct)), - rdma_dispatcher(make_shared<RDMADispatcher>(cct, ib)) +RDMAStack::RDMAStack(CephContext *cct, const std::string &t) + : NetworkStack(cct, t), ib(std::make_shared<Infiniband>(cct)), + rdma_dispatcher(std::make_shared<RDMADispatcher>(cct, ib)) { ldout(cct, 20) << __func__ << " constructing RDMAStack..." << dendl; diff --git a/src/msg/async/rdma/RDMAStack.h b/src/msg/async/rdma/RDMAStack.h index 45a043d2e23..c9772904ac2 100644 --- a/src/msg/async/rdma/RDMAStack.h +++ b/src/msg/async/rdma/RDMAStack.h @@ -40,7 +40,7 @@ class RDMADispatcher { std::thread t; CephContext *cct; - shared_ptr<Infiniband> ib; + std::shared_ptr<Infiniband> ib; Infiniband::CompletionQueue* tx_cq = nullptr; Infiniband::CompletionQueue* rx_cq = nullptr; Infiniband::CompletionChannel *tx_cc = nullptr, *rx_cc = nullptr; @@ -81,7 +81,7 @@ class RDMADispatcher { public: PerfCounters *perf_logger; - explicit RDMADispatcher(CephContext* c, shared_ptr<Infiniband>& ib); + explicit RDMADispatcher(CephContext* c, std::shared_ptr<Infiniband>& ib); virtual ~RDMADispatcher(); void handle_async_event(); @@ -120,10 +120,10 @@ class RDMAWorker : public Worker { typedef Infiniband::MemoryManager::Chunk Chunk; typedef Infiniband::MemoryManager MemoryManager; typedef std::vector<Chunk*>::iterator ChunkIter; - shared_ptr<Infiniband> ib; + std::shared_ptr<Infiniband> ib; EventCallbackRef tx_handler; std::list<RDMAConnectedSocketImpl*> pending_sent_conns; - shared_ptr<RDMADispatcher> dispatcher; + std::shared_ptr<RDMADispatcher> dispatcher; ceph::mutex lock = ceph::make_mutex("RDMAWorker::lock"); class C_handle_cq_tx : public EventCallback { @@ -150,8 +150,8 @@ class RDMAWorker : public Worker { pending_sent_conns.remove(o); } void handle_pending_message(); - void set_dispatcher(shared_ptr<RDMADispatcher>& dispatcher) { this->dispatcher = dispatcher; } - void set_ib(shared_ptr<Infiniband> &ib) {this->ib = ib;} + void set_dispatcher(std::shared_ptr<RDMADispatcher>& dispatcher) { this->dispatcher = dispatcher; } + void set_ib(std::shared_ptr<Infiniband> &ib) {this->ib = ib;} void notify_worker() { center.dispatch_event_external(tx_handler); } @@ -178,12 +178,12 @@ class RDMAConnectedSocketImpl : public ConnectedSocketImpl { uint32_t local_qpn = 0; int connected; int error; - shared_ptr<Infiniband> ib; - shared_ptr<RDMADispatcher> dispatcher; + std::shared_ptr<Infiniband> ib; + std::shared_ptr<RDMADispatcher> dispatcher; RDMAWorker* worker; std::vector<Chunk*> buffers; int notify_fd = -1; - bufferlist pending_bl; + ceph::buffer::list pending_bl; ceph::mutex lock = ceph::make_mutex("RDMAConnectedSocketImpl::lock"); std::vector<ibv_wc> wc; @@ -204,8 +204,8 @@ class RDMAConnectedSocketImpl : public ConnectedSocketImpl { const decltype(std::cbegin(pending_bl.buffers()))& end); public: - RDMAConnectedSocketImpl(CephContext *cct, shared_ptr<Infiniband>& ib, - shared_ptr<RDMADispatcher>& rdma_dispatcher, RDMAWorker *w); + RDMAConnectedSocketImpl(CephContext *cct, std::shared_ptr<Infiniband>& ib, + std::shared_ptr<RDMADispatcher>& rdma_dispatcher, RDMAWorker *w); virtual ~RDMAConnectedSocketImpl(); void pass_wc(std::vector<ibv_wc> &&v); @@ -213,7 +213,7 @@ class RDMAConnectedSocketImpl : public ConnectedSocketImpl { virtual int is_connected() override { return connected; } virtual ssize_t read(char* buf, size_t len) override; - virtual ssize_t send(bufferlist &bl, bool more) override; + virtual ssize_t send(ceph::buffer::list &bl, bool more) override; virtual void shutdown() override; virtual void close() override; virtual int fd() const override { return notify_fd; } @@ -249,8 +249,9 @@ enum RDMA_CM_STATUS { class RDMAIWARPConnectedSocketImpl : public RDMAConnectedSocketImpl { public: - RDMAIWARPConnectedSocketImpl(CephContext *cct, shared_ptr<Infiniband>& ib, - shared_ptr<RDMADispatcher>& rdma_dispatcher, RDMAWorker *w, RDMACMInfo *info = nullptr); + RDMAIWARPConnectedSocketImpl(CephContext *cct, std::shared_ptr<Infiniband>& ib, + std::shared_ptr<RDMADispatcher>& rdma_dispatcher, + RDMAWorker *w, RDMACMInfo *info = nullptr); ~RDMAIWARPConnectedSocketImpl(); virtual int try_connect(const entity_addr_t&, const SocketOptions &opt) override; virtual void close() override; @@ -283,16 +284,16 @@ class RDMAIWARPConnectedSocketImpl : public RDMAConnectedSocketImpl { class RDMAServerSocketImpl : public ServerSocketImpl { protected: CephContext *cct; - NetHandler net; + ceph::NetHandler net; int server_setup_socket; - shared_ptr<Infiniband> ib; - shared_ptr<RDMADispatcher> dispatcher; + std::shared_ptr<Infiniband> ib; + std::shared_ptr<RDMADispatcher> dispatcher; RDMAWorker *worker; entity_addr_t sa; public: - RDMAServerSocketImpl(CephContext *cct, shared_ptr<Infiniband>& ib, - shared_ptr<RDMADispatcher>& rdma_dispatcher, + RDMAServerSocketImpl(CephContext *cct, std::shared_ptr<Infiniband>& ib, + std::shared_ptr<RDMADispatcher>& rdma_dispatcher, RDMAWorker *w, entity_addr_t& a, unsigned slot); virtual int listen(entity_addr_t &sa, const SocketOptions &opt); @@ -304,8 +305,8 @@ class RDMAServerSocketImpl : public ServerSocketImpl { class RDMAIWARPServerSocketImpl : public RDMAServerSocketImpl { public: RDMAIWARPServerSocketImpl( - CephContext *cct, shared_ptr<Infiniband>& ib, - shared_ptr<RDMADispatcher>& rdma_dispatcher, + CephContext *cct, std::shared_ptr<Infiniband>& ib, + std::shared_ptr<RDMADispatcher>& rdma_dispatcher, RDMAWorker* w, entity_addr_t& addr, unsigned addr_slot); virtual int listen(entity_addr_t &sa, const SocketOptions &opt) override; virtual int accept(ConnectedSocket *s, const SocketOptions &opts, entity_addr_t *out, Worker *w) override; @@ -316,15 +317,15 @@ class RDMAIWARPServerSocketImpl : public RDMAServerSocketImpl { }; class RDMAStack : public NetworkStack { - vector<std::thread> threads; + std::vector<std::thread> threads; PerfCounters *perf_counter; - shared_ptr<Infiniband> ib; - shared_ptr<RDMADispatcher> rdma_dispatcher; + std::shared_ptr<Infiniband> ib; + std::shared_ptr<RDMADispatcher> rdma_dispatcher; std::atomic<bool> fork_finished = {false}; public: - explicit RDMAStack(CephContext *cct, const string &t); + explicit RDMAStack(CephContext *cct, const std::string &t); virtual ~RDMAStack(); virtual bool nonblock_connect_need_writable_event() const override { return false; } diff --git a/src/msg/msg_types.cc b/src/msg/msg_types.cc index 7d29713538b..1f0c8242a8c 100644 --- a/src/msg/msg_types.cc +++ b/src/msg/msg_types.cc @@ -1,3 +1,5 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab #include "msg_types.h" @@ -8,26 +10,26 @@ #include "common/Formatter.h" -void entity_name_t::dump(Formatter *f) const +void entity_name_t::dump(ceph::Formatter *f) const { f->dump_string("type", type_str()); f->dump_unsigned("num", num()); } -void entity_addr_t::dump(Formatter *f) const +void entity_addr_t::dump(ceph::Formatter *f) const { f->dump_string("type", get_type_name(type)); f->dump_stream("addr") << get_sockaddr(); f->dump_unsigned("nonce", nonce); } -void entity_inst_t::dump(Formatter *f) const +void entity_inst_t::dump(ceph::Formatter *f) const { f->dump_object("name", name); f->dump_object("addr", addr); } -void entity_name_t::generate_test_instances(list<entity_name_t*>& o) +void entity_name_t::generate_test_instances(std::list<entity_name_t*>& o) { o.push_back(new entity_name_t(entity_name_t::MON())); o.push_back(new entity_name_t(entity_name_t::MON(1))); @@ -35,7 +37,7 @@ void entity_name_t::generate_test_instances(list<entity_name_t*>& o) o.push_back(new entity_name_t(entity_name_t::CLIENT(1))); } -void entity_addr_t::generate_test_instances(list<entity_addr_t*>& o) +void entity_addr_t::generate_test_instances(std::list<entity_addr_t*>& o) { o.push_back(new entity_addr_t()); entity_addr_t *a = new entity_addr_t(); @@ -53,7 +55,7 @@ void entity_addr_t::generate_test_instances(list<entity_addr_t*>& o) o.push_back(b); } -void entity_inst_t::generate_test_instances(list<entity_inst_t*>& o) +void entity_inst_t::generate_test_instances(std::list<entity_inst_t*>& o) { o.push_back(new entity_inst_t()); entity_name_t name; @@ -175,7 +177,7 @@ bool entity_addr_t::parse(const char *s, const char **end, int default_type) return true; } -ostream& operator<<(ostream& out, const entity_addr_t &addr) +std::ostream& operator<<(std::ostream& out, const entity_addr_t &addr) { if (addr.type == entity_addr_t::TYPE_NONE) { return out << "-"; @@ -187,7 +189,7 @@ ostream& operator<<(ostream& out, const entity_addr_t &addr) return out; } -ostream& operator<<(ostream& out, const sockaddr *psa) +std::ostream& operator<<(std::ostream& out, const sockaddr *psa) { char buf[NI_MAXHOST] = { 0 }; @@ -211,7 +213,7 @@ ostream& operator<<(ostream& out, const sockaddr *psa) } } -ostream& operator<<(ostream& out, const sockaddr_storage &ss) +std::ostream& operator<<(std::ostream& out, const sockaddr_storage &ss) { return out << (const sockaddr*)&ss; } @@ -274,7 +276,7 @@ bool entity_addrvec_t::parse(const char *s, const char **end) return !v.empty(); } -void entity_addrvec_t::encode(bufferlist& bl, uint64_t features) const +void entity_addrvec_t::encode(ceph::buffer::list& bl, uint64_t features) const { using ceph::encode; if ((features & CEPH_FEATURE_MSG_ADDR2) == 0) { @@ -286,7 +288,7 @@ void entity_addrvec_t::encode(bufferlist& bl, uint64_t features) const encode(v, bl, features); } -void entity_addrvec_t::decode(bufferlist::const_iterator& bl) +void entity_addrvec_t::decode(ceph::buffer::list::const_iterator& bl) { using ceph::decode; __u8 marker; @@ -315,21 +317,20 @@ void entity_addrvec_t::decode(bufferlist::const_iterator& bl) return; } if (marker > 2) - throw buffer::malformed_input("entity_addrvec_marker > 2"); + throw ceph::buffer::malformed_input("entity_addrvec_marker > 2"); decode(v, bl); } -void entity_addrvec_t::dump(Formatter *f) const +void entity_addrvec_t::dump(ceph::Formatter *f) const { f->open_array_section("addrvec"); - for (vector<entity_addr_t>::const_iterator p = v.begin(); - p != v.end(); ++p) { + for (auto p = v.begin(); p != v.end(); ++p) { f->dump_object("addr", *p); } f->close_section(); } -void entity_addrvec_t::generate_test_instances(list<entity_addrvec_t*>& ls) +void entity_addrvec_t::generate_test_instances(std::list<entity_addrvec_t*>& ls) { ls.push_back(new entity_addrvec_t()); ls.push_back(new entity_addrvec_t()); diff --git a/src/msg/msg_types.h b/src/msg/msg_types.h index 3016d2c53fc..3caf83f24e5 100644 --- a/src/msg/msg_types.h +++ b/src/msg/msg_types.h @@ -523,13 +523,13 @@ struct entity_addr_t { #endif uint16_t ss_family; if (elen < sizeof(ss_family)) { - throw buffer::malformed_input("elen smaller than family len"); + throw ceph::buffer::malformed_input("elen smaller than family len"); } decode(ss_family, bl); u.sa.sa_family = ss_family; elen -= sizeof(ss_family); if (elen > get_sockaddr_len() - sizeof(u.sa.sa_family)) { - throw buffer::malformed_input("elen exceeds sockaddr len"); + throw ceph::buffer::malformed_input("elen exceeds sockaddr len"); } bl.copy(elen, u.sa.sa_data); } diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index c51cd24e509..41dd45f38e3 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -14,11 +14,13 @@ #ifndef CEPH_OBJECTSTORE_H #define CEPH_OBJECTSTORE_H +#include "include/buffer.h" #include "include/common_fwd.h" #include "include/Context.h" -#include "include/buffer.h" -#include "include/types.h" +#include "include/interval_set.h" #include "include/stringify.h" +#include "include/types.h" + #include "osd/osd_types.h" #include "common/TrackedOp.h" #include "common/WorkQueue.h" @@ -514,7 +516,7 @@ public: uint32_t op_flags = 0) { int total = 0; for (auto p = m.begin(); p != m.end(); p++) { - bufferlist t; + ceph::buffer::list t; int r = read(c, oid, p.get_start(), p.get_len(), t, op_flags); if (r < 0) return r; @@ -554,7 +556,7 @@ public: CollectionHandle &c, const ghobject_t& oid, const string& section_name, - Formatter *f) { + ceph::Formatter *f) { return -ENOTSUP; } diff --git a/src/os/Transaction.h b/src/os/Transaction.h index 88c5fac6c7a..fe4f25313fe 100644 --- a/src/os/Transaction.h +++ b/src/os/Transaction.h @@ -5,8 +5,10 @@ #include <map> +#include "include/Context.h" #include "include/int_types.h" #include "include/buffer.h" + #include "osd/osd_types.h" #define OPS_PER_PTR 32 @@ -362,7 +364,7 @@ public: } static Context *collect_all_contexts( Transaction& t) { - list<Context*> contexts; + std::list<Context*> contexts; contexts.splice(contexts.end(), t.on_applied); contexts.splice(contexts.end(), t.on_commit); contexts.splice(contexts.end(), t.on_applied_sync); diff --git a/src/os/bluestore/BitmapFreelistManager.cc b/src/os/bluestore/BitmapFreelistManager.cc index 7dcef4384ad..13c60b4962e 100644 --- a/src/os/bluestore/BitmapFreelistManager.cc +++ b/src/os/bluestore/BitmapFreelistManager.cc @@ -111,11 +111,11 @@ int BitmapFreelistManager::expand(uint64_t new_size, KeyValueDB::Transaction txn uint64_t blocks0 = size / bytes_per_block; if (blocks0 / blocks_per_key * blocks_per_key != blocks0) { - blocks0 = (blocks / blocks_per_key + 1) * blocks_per_key; + blocks0 = (blocks0 / blocks_per_key + 1) * blocks_per_key; dout(10) << __func__ << " rounding blocks up from 0x" << std::hex << size << " to 0x" << (blocks0 * bytes_per_block) << " (0x" << blocks0 << " blocks)" << std::dec << dendl; - // reset past-eof blocks to unallocated + // reset previous past-eof blocks to unallocated _xor(size, blocks0 * bytes_per_block - size, txn); } diff --git a/src/os/bluestore/KernelDevice.cc b/src/os/bluestore/KernelDevice.cc index 990e0ce9099..f816cd66b52 100644 --- a/src/os/bluestore/KernelDevice.cc +++ b/src/os/bluestore/KernelDevice.cc @@ -55,7 +55,7 @@ KernelDevice::KernelDevice(CephContext* cct, aio_callback_t cb, void *cbpriv, ai fd_directs.resize(WRITE_LIFE_MAX, -1); fd_buffereds.resize(WRITE_LIFE_MAX, -1); - bool use_ioring = g_ceph_context->_conf.get_val<bool>("bluestore_ioring"); + bool use_ioring = cct->_conf.get_val<bool>("bluestore_ioring"); unsigned int iodepth = cct->_conf->bdev_aio_max_queue_depth; if (use_ioring && ioring_queue_t::supported()) { diff --git a/src/os/bluestore/NVMEDevice.cc b/src/os/bluestore/NVMEDevice.cc index dc3745ce407..4ed7c0449a0 100644 --- a/src/os/bluestore/NVMEDevice.cc +++ b/src/os/bluestore/NVMEDevice.cc @@ -551,6 +551,8 @@ static bool probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, st return false; } + opts->io_queue_size = UINT16_MAX; + return true; } diff --git a/src/os/filestore/FileJournal.h b/src/os/filestore/FileJournal.h index d2475e437f8..b0204366265 100644 --- a/src/os/filestore/FileJournal.h +++ b/src/os/filestore/FileJournal.h @@ -417,7 +417,7 @@ private: full_state(FULL_NOTFULL), fd(-1), writing_seq(0), - throttle(cct->_conf->filestore_caller_concurrency), + throttle(cct, cct->_conf->filestore_caller_concurrency), write_stop(true), aio_stop(true), write_thread(this), diff --git a/src/os/filestore/JournalThrottle.h b/src/os/filestore/JournalThrottle.h index 75485d6d8f3..f32f5d734f5 100644 --- a/src/os/filestore/JournalThrottle.h +++ b/src/os/filestore/JournalThrottle.h @@ -94,8 +94,9 @@ public: uint64_t get_max(); JournalThrottle( + CephContext *cct, unsigned expected_concurrency ///< [in] determines size of conds - ) : throttle(g_ceph_context, "filestore_journal", expected_concurrency) {} + ) : throttle(cct, "filestore_journal", expected_concurrency) {} }; #endif diff --git a/src/osd/ClassHandler.cc b/src/osd/ClassHandler.cc index 0f9f5111c8b..2bf6a69ad10 100644 --- a/src/osd/ClassHandler.cc +++ b/src/osd/ClassHandler.cc @@ -25,6 +25,12 @@ #define CLS_PREFIX "libcls_" #define CLS_SUFFIX ".so" +using std::map; +using std::set; +using std::string; + +using ceph::bufferlist; + int ClassHandler::open_class(const string& cname, ClassData **pcls) { @@ -319,7 +325,7 @@ int ClassHandler::ClassMethod::exec(cls_method_context_t ctx, bufferlist& indata ret = method(ctx, indata.c_str(), indata.length(), &out, &olen); if (out) { // assume *out was allocated via cls_alloc (which calls malloc!) - buffer::ptr bp = buffer::claim_malloc(olen, out); + ceph::buffer::ptr bp = ceph::buffer::claim_malloc(olen, out); outdata.push_back(bp); } } else { diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index 9b46de4af63..68ab48b3fdb 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -956,7 +956,7 @@ void ECBackend::handle_sub_write( } } get_parent()->log_operation( - op.log_entries, + std::move(op.log_entries), op.updated_hit_set_history, op.trim_to, op.roll_forward_to, @@ -1487,7 +1487,7 @@ void ECBackend::submit_transaction( PGTransactionUPtr &&t, const eversion_t &trim_to, const eversion_t &min_last_complete_ondisk, - const vector<pg_log_entry_t> &log_entries, + vector<pg_log_entry_t>&& log_entries, std::optional<pg_hit_set_history_t> &hset_history, Context *on_all_commit, ceph_tid_t tid, diff --git a/src/osd/ECBackend.h b/src/osd/ECBackend.h index c34c5c52e1e..9d553bb68ff 100644 --- a/src/osd/ECBackend.h +++ b/src/osd/ECBackend.h @@ -103,7 +103,7 @@ public: PGTransactionUPtr &&t, const eversion_t &trim_to, const eversion_t &min_last_complete_ondisk, - const vector<pg_log_entry_t> &log_entries, + vector<pg_log_entry_t>&& log_entries, std::optional<pg_hit_set_history_t> &hset_history, Context *on_all_commit, ceph_tid_t tid, diff --git a/src/osd/OSDMap.h b/src/osd/OSDMap.h index cdbacbb1e63..634e385c41b 100644 --- a/src/osd/OSDMap.h +++ b/src/osd/OSDMap.h @@ -1054,17 +1054,17 @@ public: */ uint64_t get_up_osd_features() const; - void get_upmap_pgs(vector<pg_t> *upmap_pgs) const; + void get_upmap_pgs(std::vector<pg_t> *upmap_pgs) const; bool check_pg_upmaps( CephContext *cct, - const vector<pg_t>& to_check, - vector<pg_t> *to_cancel, - map<pg_t, mempool::osdmap::vector<pair<int,int>>> *to_remap) const; + const std::vector<pg_t>& to_check, + std::vector<pg_t> *to_cancel, + std::map<pg_t, mempool::osdmap::vector<std::pair<int,int>>> *to_remap) const; void clean_pg_upmaps( CephContext *cct, Incremental *pending_inc, - const vector<pg_t>& to_cancel, - const map<pg_t, mempool::osdmap::vector<pair<int,int>>>& to_remap) const; + const std::vector<pg_t>& to_cancel, + const std::map<pg_t, mempool::osdmap::vector<std::pair<int,int>>>& to_remap) const; bool clean_pg_upmaps(CephContext *cct, Incremental *pending_inc) const; int apply_incremental(const Incremental &inc); @@ -1427,7 +1427,7 @@ public: pg_upmap_items.count(pg); } - bool check_full(const set<pg_shard_t> &missing_on) const { + bool check_full(const std::set<pg_shard_t> &missing_on) const { for (auto shard : missing_on) { if (get_state(shard.osd) & CEPH_OSD_FULL) return true; diff --git a/src/osd/OSDMapMapping.cc b/src/osd/OSDMapMapping.cc index ba59c21dfbe..9cd1fbf5823 100644 --- a/src/osd/OSDMapMapping.cc +++ b/src/osd/OSDMapMapping.cc @@ -8,6 +8,8 @@ #include "common/debug.h" +using std::vector; + MEMPOOL_DEFINE_OBJECT_FACTORY(OSDMapMapping, osdmapmapping, osdmap_mapping); diff --git a/src/osd/OSDMapMapping.h b/src/osd/OSDMapMapping.h index 37ec74f6f50..4096c389de4 100644 --- a/src/osd/OSDMapMapping.h +++ b/src/osd/OSDMapMapping.h @@ -33,7 +33,7 @@ public: } // child must implement either form of process - virtual void process(const vector<pg_t>& pgs) = 0; + virtual void process(const std::vector<pg_t>& pgs) = 0; virtual void process(int64_t poolid, unsigned ps_begin, unsigned ps_end) = 0; virtual void complete() = 0; @@ -100,9 +100,9 @@ protected: Job *job; int64_t pool; unsigned begin, end; - vector<pg_t> pgs; + std::vector<pg_t> pgs; - Item(Job *j, vector<pg_t> pgs) : job(j), pgs(pgs) {} + Item(Job *j, std::vector<pg_t> pgs) : job(j), pgs(pgs) {} Item(Job *j, int64_t p, unsigned b, unsigned e) : job(j), pool(p), @@ -158,7 +158,7 @@ public: void queue( Job *job, unsigned pgs_per_item, - const vector<pg_t>& input_pgs); + const std::vector<pg_t>& input_pgs); void drain() { wq.drain(); @@ -275,7 +275,7 @@ private: : Job(osdmap), mapping(m) { mapping->_start(*osdmap); } - void process(const vector<pg_t>& pgs) override {} + void process(const std::vector<pg_t>& pgs) override {} void process(int64_t pool, unsigned ps_begin, unsigned ps_end) override { mapping->_update_range(*osdmap, pool, ps_begin, ps_end); } diff --git a/src/osd/PGBackend.h b/src/osd/PGBackend.h index 4a952c4ed8b..223dce56786 100644 --- a/src/osd/PGBackend.h +++ b/src/osd/PGBackend.h @@ -231,7 +231,7 @@ typedef std::shared_ptr<const OSDMap> OSDMapRef; virtual bool pg_is_repair() const = 0; virtual void log_operation( - const vector<pg_log_entry_t> &logv, + vector<pg_log_entry_t>&& logv, const std::optional<pg_hit_set_history_t> &hset_history, const eversion_t &trim_to, const eversion_t &roll_forward_to, @@ -451,7 +451,7 @@ typedef std::shared_ptr<const OSDMap> OSDMapRef; const eversion_t &trim_to, ///< [in] trim log to here const eversion_t &min_last_complete_ondisk, ///< [in] lower bound on /// committed version - const vector<pg_log_entry_t> &log_entries, ///< [in] log entries for t + vector<pg_log_entry_t>&& log_entries, ///< [in] log entries for t /// [in] hitset history (if updated with this transaction) std::optional<pg_hit_set_history_t> &hset_history, Context *on_all_commit, ///< [in] called when all commit diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index 685334cc09a..7f025c2b945 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -3794,7 +3794,7 @@ void PeeringState::add_log_entry(const pg_log_entry_t& e, bool applied) void PeeringState::append_log( - const vector<pg_log_entry_t>& logv, + vector<pg_log_entry_t>&& logv, eversion_t trim_to, eversion_t roll_forward_to, eversion_t mlcod, @@ -5575,13 +5575,32 @@ boost::statechart::result PeeringState::Active::react(const AdvMap& advmap) ps->share_pg_info(); } + bool need_acting_change = false; for (size_t i = 0; i < ps->want_acting.size(); i++) { int osd = ps->want_acting[i]; if (!advmap.osdmap->is_up(osd)) { pg_shard_t osd_with_shard(osd, shard_id_t(i)); - ceph_assert(ps->is_acting(osd_with_shard) || ps->is_up(osd_with_shard)); + if (!ps->is_acting(osd_with_shard) && !ps->is_up(osd_with_shard)) { + psdout(10) << "Active stray osd." << osd << " in want_acting is down" + << dendl; + need_acting_change = true; + } } } + if (need_acting_change) { + psdout(10) << "Active need acting change, call choose_acting again" + << dendl; + // possibly because we re-add some strays into the acting set and + // some of them then go down in a subsequent map before we could see + // the map changing the pg temp. + // call choose_acting again to clear them out. + // note that we leave restrict_to_up_acting to false in order to + // not overkill any chosen stray that is still alive. + pg_shard_t auth_log_shard; + bool history_les_bound = false; + ps->remove_down_peer_info(advmap.osdmap); + ps->choose_acting(auth_log_shard, false, &history_les_bound, true); + } /* Check for changes in pool size (if the acting set changed as a result, * this does not matter) */ diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index 160ca0090e1..027b9b5459f 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -1772,11 +1772,22 @@ public: std::optional<eversion_t> trim_to, std::optional<eversion_t> roll_forward_to); + void append_log_with_trim_to_updated( + std::vector<pg_log_entry_t>&& log_entries, + eversion_t roll_forward_to, + ObjectStore::Transaction &t, + bool transaction_applied, + bool async) { + update_trim_to(); + append_log(std::move(log_entries), pg_trim_to, roll_forward_to, + min_last_complete_ondisk, t, transaction_applied, async); + } + /** * Updates local log to reflect new write from primary. */ void append_log( - const vector<pg_log_entry_t>& logv, + vector<pg_log_entry_t>&& logv, eversion_t trim_to, eversion_t roll_forward_to, eversion_t min_last_complete_ondisk, diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 5332703ba33..873dd906e51 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10590,7 +10590,7 @@ void PrimaryLogPG::issue_repop(RepGather *repop, OpContext *ctx) std::move(ctx->op_t), recovery_state.get_pg_trim_to(), recovery_state.get_min_last_complete_ondisk(), - ctx->log, + std::move(ctx->log), ctx->updated_hset_history, on_all_commit, repop->rep_tid, diff --git a/src/osd/PrimaryLogPG.h b/src/osd/PrimaryLogPG.h index fd303e2ac54..370aa1e6435 100644 --- a/src/osd/PrimaryLogPG.h +++ b/src/osd/PrimaryLogPG.h @@ -455,7 +455,7 @@ public: } void log_operation( - const vector<pg_log_entry_t> &logv, + vector<pg_log_entry_t>&& logv, const std::optional<pg_hit_set_history_t> &hset_history, const eversion_t &trim_to, const eversion_t &roll_forward_to, @@ -478,7 +478,7 @@ public: replica_clear_repop_obc(logv, t); } recovery_state.append_log( - logv, trim_to, roll_forward_to, min_last_complete_ondisk, + std::move(logv), trim_to, roll_forward_to, min_last_complete_ondisk, t, transaction_applied, async); } diff --git a/src/osd/ReplicatedBackend.cc b/src/osd/ReplicatedBackend.cc index 9a243f795a7..dfdadfa5202 100644 --- a/src/osd/ReplicatedBackend.cc +++ b/src/osd/ReplicatedBackend.cc @@ -451,7 +451,7 @@ void ReplicatedBackend::submit_transaction( PGTransactionUPtr &&_t, const eversion_t &trim_to, const eversion_t &min_last_complete_ondisk, - const vector<pg_log_entry_t> &_log_entries, + vector<pg_log_entry_t>&& _log_entries, std::optional<pg_hit_set_history_t> &hset_history, Context *on_all_commit, ceph_tid_t tid, @@ -510,7 +510,7 @@ void ReplicatedBackend::submit_transaction( clear_temp_objs(removed); parent->log_operation( - log_entries, + std::move(log_entries), hset_history, trim_to, at_version, @@ -1108,7 +1108,7 @@ void ReplicatedBackend::do_repop(OpRequestRef op) parent->update_stats(m->pg_stats); parent->log_operation( - log, + std::move(log), m->updated_hit_set_history, m->pg_trim_to, m->version, /* Replicated PGs don't have rollback info */ diff --git a/src/osd/ReplicatedBackend.h b/src/osd/ReplicatedBackend.h index e4b6c3ca905..83ba03d7f9e 100644 --- a/src/osd/ReplicatedBackend.h +++ b/src/osd/ReplicatedBackend.h @@ -366,7 +366,7 @@ public: PGTransactionUPtr &&t, const eversion_t &trim_to, const eversion_t &min_last_complete_ondisk, - const vector<pg_log_entry_t> &log_entries, + vector<pg_log_entry_t>&& log_entries, std::optional<pg_hit_set_history_t> &hset_history, Context *on_all_commit, ceph_tid_t tid, diff --git a/src/osd/osd_op_util.cc b/src/osd/osd_op_util.cc index 626779843c7..48e3cb4b46a 100644 --- a/src/osd/osd_op_util.cc +++ b/src/osd/osd_op_util.cc @@ -6,6 +6,12 @@ #include "osd/ClassHandler.h" #include "messages/MOSDOp.h" +using std::ostream; +using std::string; +using std::vector; + +using ceph::bufferlist; + bool OpInfo::check_rmw(int flag) const { ceph_assert(rmw_flags != 0); return rmw_flags & flag; diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index cc5d91d528f..416f5cafd76 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -51,11 +51,14 @@ using std::stringstream; using std::unique_ptr; using std::vector; +using ceph::bufferlist; using ceph::decode; using ceph::decode_nohead; using ceph::encode; using ceph::encode_nohead; using ceph::Formatter; +using ceph::make_timespan; +using ceph::JSONFormatter; using namespace std::literals; @@ -3715,7 +3718,7 @@ public: pair<epoch_t, epoch_t> get_bounds() const override { return make_pair(first, last + 1); } - void adjust_start_backwards(epoch_t last_epoch_clean) { + void adjust_start_backwards(epoch_t last_epoch_clean) override { first = last_epoch_clean; } @@ -6961,7 +6964,7 @@ int PGLSPlainFilter::init(ceph::bufferlist::const_iterator ¶ms) try { decode(xattr, params); decode(val, params); - } catch (buffer::error &e) { + } catch (ceph::buffer::error &e) { return -EINVAL; } return 0; diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index eec67724f24..5c0f0a9ad6f 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -12,7 +12,7 @@ * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software * Foundation. See file COPYING. - * + * */ #ifndef CEPH_OSD_TYPES_H @@ -2372,7 +2372,7 @@ struct osd_stat_t { uint32_t front_max[3]; uint32_t front_last; }; - map<int, Interfaces> hb_pingtime; ///< map of osd id to Interfaces + std::map<int, Interfaces> hb_pingtime; ///< map of osd id to Interfaces osd_stat_t() : snap_trim_queue_len(0), num_snap_trimming(0), num_shards_repaired(0) {} @@ -3686,7 +3686,7 @@ struct pg_lease_t { void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<pg_lease_t*>& o); - friend ostream& operator<<(ostream& out, const pg_lease_t& l) { + friend std::ostream& operator<<(std::ostream& out, const pg_lease_t& l) { return out << "pg_lease(ru " << l.readable_until << " ub " << l.readable_until_ub << " int " << l.interval << ")"; @@ -3713,7 +3713,7 @@ struct pg_lease_ack_t { void dump(ceph::Formatter *f) const; static void generate_test_instances(std::list<pg_lease_ack_t*>& o); - friend ostream& operator<<(ostream& out, const pg_lease_ack_t& l) { + friend std::ostream& operator<<(std::ostream& out, const pg_lease_ack_t& l) { return out << "pg_lease_ack(ruub " << l.readable_until_ub << ")"; } }; @@ -3905,7 +3905,7 @@ private: * finally, clean_offsets becomes {[5~10], [30~10]} */ void trim(); - friend ostream& operator<<(ostream& out, const ObjectCleanRegions& ocr); + friend std::ostream& operator<<(std::ostream& out, const ObjectCleanRegions& ocr); public: ObjectCleanRegions() : new_object(false), clean_omap(true) { clean_offsets.insert(0, (uint64_t)-1); @@ -3927,13 +3927,13 @@ public: bool omap_is_dirty() const; bool object_is_exist() const; - void encode(bufferlist &bl) const; - void decode(bufferlist::const_iterator &bl); - void dump(Formatter *f) const; - static void generate_test_instances(list<ObjectCleanRegions*>& o); + void encode(ceph::buffer::list &bl) const; + void decode(ceph::buffer::list::const_iterator &bl); + void dump(ceph::Formatter *f) const; + static void generate_test_instances(std::list<ObjectCleanRegions*>& o); }; WRITE_CLASS_ENCODER(ObjectCleanRegions) -ostream& operator<<(ostream& out, const ObjectCleanRegions& ocr); +std::ostream& operator<<(std::ostream& out, const ObjectCleanRegions& ocr); struct OSDOp { @@ -4001,18 +4001,18 @@ std::ostream& operator<<(std::ostream& out, const OSDOp& op); struct pg_log_op_return_item_t { int32_t rval; - bufferlist bl; - void encode(bufferlist& p) const { + ceph::buffer::list bl; + void encode(ceph::buffer::list& p) const { using ceph::encode; encode(rval, p); encode(bl, p); } - void decode(bufferlist::const_iterator& p) { + void decode(ceph::buffer::list::const_iterator& p) { using ceph::decode; decode(rval, p); decode(bl, p); } - void dump(Formatter *f) const { + void dump(ceph::Formatter *f) const { f->dump_int("rval", rval); f->dump_unsigned("bl_length", bl.length()); } @@ -4025,7 +4025,7 @@ struct pg_log_op_return_item_t { const pg_log_op_return_item_t& rhs) { return !(lhs == rhs); } - friend ostream& operator<<(ostream& out, const pg_log_op_return_item_t& i) { + friend std::ostream& operator<<(std::ostream& out, const pg_log_op_return_item_t& i) { return out << "r=" << i.rval << "+" << i.bl.length() << "b"; } }; @@ -4091,7 +4091,7 @@ struct pg_log_entry_t { utime_t mtime; // this is the _user_ mtime, mind you int32_t return_code; // only stored for ERRORs for dup detection - vector<pg_log_op_return_item_t> op_returns; + std::vector<pg_log_op_return_item_t> op_returns; __s32 op; bool invalid_hash; // only when decoding sobject_t based entries @@ -4185,7 +4185,7 @@ struct pg_log_dup_t { version_t user_version; // the user version for this entry int32_t return_code; // only stored for ERRORs for dup detection - vector<pg_log_op_return_item_t> op_returns; + std::vector<pg_log_op_return_item_t> op_returns; pg_log_dup_t() : user_version(0), return_code(0) @@ -6220,11 +6220,11 @@ WRITE_CLASS_ENCODER(pool_pg_num_history_t) // prefix pgmeta_oid keys with _ so that PGLog::read_log_and_missing() can // easily skip them -static const string_view infover_key = "_infover"sv; -static const string_view info_key = "_info"sv; -static const string_view biginfo_key = "_biginfo"sv; -static const string_view epoch_key = "_epoch"sv; -static const string_view fastinfo_key = "_fastinfo"sv; +static const std::string_view infover_key = "_infover"; +static const std::string_view info_key = "_info"; +static const std::string_view biginfo_key = "_biginfo"; +static const std::string_view epoch_key = "_epoch"; +static const std::string_view fastinfo_key = "_fastinfo"; static const __u8 pg_latest_struct_v = 10; // v10 is the new past_intervals encoding @@ -6236,8 +6236,8 @@ static const __u8 pg_compat_struct_v = 10; int prepare_info_keymap( CephContext* cct, - map<string,bufferlist> *km, - string *key_to_remove, + std::map<std::string,ceph::buffer::list> *km, + std::string *key_to_remove, epoch_t epoch, pg_info_t &info, pg_info_t &last_written_info, @@ -6299,10 +6299,10 @@ public: class PGLSPlainFilter : public PGLSFilter { std::string val; public: - int init(ceph::bufferlist::const_iterator ¶ms) override; + int init(ceph::buffer::list::const_iterator ¶ms) override; ~PGLSPlainFilter() override {} bool filter(const hobject_t& obj, - const ceph::bufferlist& xattr_data) const override; + const ceph::buffer::list& xattr_data) const override; }; diff --git a/src/osdc/Filer.cc b/src/osdc/Filer.cc index 93abbb7cdb1..d97e5de0a61 100644 --- a/src/osdc/Filer.cc +++ b/src/osdc/Filer.cc @@ -34,6 +34,10 @@ #undef dout_prefix #define dout_prefix *_dout << objecter->messenger->get_myname() << ".filer " +using std::hex; +using std::dec; +using std::vector; + class Filer::C_Probe : public Context { public: Filer *filer; @@ -156,9 +160,7 @@ void Filer::_probe(Probe *probe, Probe::unique_lock& pl) probe->probing_len, 0, probe->probing); std::vector<ObjectExtent> stat_extents; - for (vector<ObjectExtent>::iterator p = probe->probing.begin(); - p != probe->probing.end(); - ++p) { + for (auto p = probe->probing.begin(); p != probe->probing.end(); ++p) { ldout(cct, 10) << "_probe probing " << p->oid << dendl; probe->ops.insert(p->oid); stat_extents.push_back(*p); @@ -211,9 +213,7 @@ bool Filer::_probed(Probe *probe, const object_t& oid, uint64_t size, std::reverse(probe->probing.begin(), probe->probing.end()); } - for (vector<ObjectExtent>::iterator p = probe->probing.begin(); - p != probe->probing.end(); - ++p) { + for (auto p = probe->probing.begin(); p != probe->probing.end(); ++p) { uint64_t shouldbe = p->length + p->offset; ldout(cct, 10) << "_probed " << probe->ino << " object " << hex << p->oid << dec << " should be " << shouldbe @@ -231,8 +231,7 @@ bool Filer::_probed(Probe *probe, const object_t& oid, uint64_t size, // aha, we found the end! // calc offset into buffer_extent to get distance from probe->from. uint64_t oleft = probe->known_size[p->oid] - p->offset; - for (vector<pair<uint64_t, uint64_t> >::iterator i - = p->buffer_extents.begin(); + for (auto i = p->buffer_extents.begin(); i != p->buffer_extents.end(); ++i) { if (oleft <= (uint64_t)i->second) { diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index b5c336b3a9a..f147bc69bb4 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -13,9 +13,20 @@ #define MAX_FLUSH_UNDER_LOCK 20 ///< max bh's we start writeback on #define BUFFER_MEMORY_WEIGHT CEPH_PAGE_SHIFT // memory usage of BufferHead, count in (1<<n) + /// while holding the lock using std::chrono::seconds; - /// while holding the lock +using std::list; +using std::map; +using std::make_pair; +using std::pair; +using std::set; +using std::string; +using std::vector; + +using ceph::bufferlist; + +using namespace std::literals; /*** ObjectCacher::BufferHead ***/ @@ -133,13 +144,11 @@ ObjectCacher::BufferHead *ObjectCacher::Object::split(BufferHead *left, // move read waiters if (!left->waitfor_read.empty()) { - map<loff_t, list<Context*> >::iterator start_remove - = left->waitfor_read.begin(); + auto start_remove = left->waitfor_read.begin(); while (start_remove != left->waitfor_read.end() && start_remove->first < right->start()) ++start_remove; - for (map<loff_t, list<Context*> >::iterator p = start_remove; - p != left->waitfor_read.end(); ++p) { + for (auto p = start_remove; p != left->waitfor_read.end(); ++p) { ldout(oc->cct, 20) << "split moving waiters at byte " << p->first << " to right bh" << dendl; right->waitfor_read[p->first].swap( p->second ); @@ -181,7 +190,7 @@ void ObjectCacher::Object::merge_left(BufferHead *left, BufferHead *right) left->set_nocache(right->get_nocache() ? left->get_nocache() : false); // waiters - for (map<loff_t, list<Context*> >::iterator p = right->waitfor_read.begin(); + for (auto p = right->waitfor_read.begin(); p != right->waitfor_read.end(); ++p) left->waitfor_read[p->first].splice(left->waitfor_read[p->first].begin(), @@ -214,7 +223,7 @@ void ObjectCacher::Object::try_merge_bh(BufferHead *bh) return; // to the left? - map<loff_t,BufferHead*>::iterator p = data.find(bh->start()); + auto p = data.find(bh->start()); ceph_assert(p->second == bh); if (p != data.begin()) { --p; @@ -252,7 +261,7 @@ void ObjectCacher::Object::maybe_rebuild_buffer(BufferHead *bh) bool ObjectCacher::Object::is_cached(loff_t cur, loff_t left) const { ceph_assert(ceph_mutex_is_locked(oc->lock)); - map<loff_t, BufferHead*>::const_iterator p = data_lower_bound(cur); + auto p = data_lower_bound(cur); while (left > 0) { if (p == data.end()) return false; @@ -282,8 +291,8 @@ bool ObjectCacher::Object::include_all_cached_data(loff_t off, loff_t len) ceph_assert(ceph_mutex_is_locked(oc->lock)); if (data.empty()) return true; - map<loff_t, BufferHead*>::iterator first = data.begin(); - map<loff_t, BufferHead*>::reverse_iterator last = data.rbegin(); + auto first = data.begin(); + auto last = data.rbegin(); if (first->second->start() >= off && last->second->end() <= (off + len)) return true; else @@ -307,7 +316,7 @@ int ObjectCacher::Object::map_read(ObjectExtent &ex, loff_t cur = ex.offset; loff_t left = ex.length; - map<loff_t, BufferHead*>::const_iterator p = data_lower_bound(ex.offset); + auto p = data_lower_bound(ex.offset); while (left > 0) { // at end? if (p == data.end()) { @@ -384,8 +393,7 @@ int ObjectCacher::Object::map_read(ObjectExtent &ex, void ObjectCacher::Object::audit_buffers() { loff_t offset = 0; - for (map<loff_t, BufferHead*>::const_iterator it = data.begin(); - it != data.end(); ++it) { + for (auto it = data.begin(); it != data.end(); ++it) { if (it->first != it->second->start()) { lderr(oc->cct) << "AUDIT FAILURE: map position " << it->first << " does not match bh start position: " @@ -399,8 +407,7 @@ void ObjectCacher::Object::audit_buffers() ceph_assert(it->first >= offset); } BufferHead *bh = it->second; - map<loff_t, list<Context*> >::const_iterator w_it; - for (w_it = bh->waitfor_read.begin(); + for (auto w_it = bh->waitfor_read.begin(); w_it != bh->waitfor_read.end(); ++w_it) { if (w_it->first < bh->start() || w_it->first >= bh->start() + bh->length()) { @@ -433,7 +440,7 @@ ObjectCacher::BufferHead *ObjectCacher::Object::map_write(ObjectExtent &ex, loff_t cur = ex.offset; loff_t left = ex.length; - map<loff_t, BufferHead*>::const_iterator p = data_lower_bound(ex.offset); + auto p = data_lower_bound(ex.offset); while (left > 0) { loff_t max = left; @@ -596,7 +603,7 @@ void ObjectCacher::Object::discard(loff_t off, loff_t len, complete = false; } - map<loff_t, BufferHead*>::const_iterator p = data_lower_bound(off); + auto p = data_lower_bound(off); while (p != data.end()) { BufferHead *bh = p->second; if (bh->start() >= off + len) @@ -680,10 +687,7 @@ ObjectCacher::~ObjectCacher() finisher.stop(); perf_stop(); // we should be empty. - for (vector<ceph::unordered_map<sobject_t, Object *> >::iterator i - = objects.begin(); - i != objects.end(); - ++i) + for (auto i = objects.begin(); i != objects.end(); ++i) ceph_assert(i->empty()); ceph_assert(bh_lru_rest.lru_get_size() == 0); ceph_assert(bh_lru_dirty.lru_get_size() == 0); @@ -844,11 +848,9 @@ void ObjectCacher::bh_read_finish(int64_t poolid, sobject_t oid, // read 1~1 -> immediate ENOENT // reply to first 1~1 -> ooo ENOENT bool allzero = true; - for (map<loff_t, BufferHead*>::iterator p = ob->data.begin(); - p != ob->data.end(); ++p) { + for (auto p = ob->data.begin(); p != ob->data.end(); ++p) { BufferHead *bh = p->second; - for (map<loff_t, list<Context*> >::iterator p - = bh->waitfor_read.begin(); + for (auto p = bh->waitfor_read.begin(); p != bh->waitfor_read.end(); ++p) ls.splice(ls.end(), p->second); @@ -882,7 +884,7 @@ void ObjectCacher::bh_read_finish(int64_t poolid, sobject_t oid, ldout(cct, 10) << "bh_read_finish ENOENT and allzero, getting rid of " << "bhs for " << *ob << dendl; - map<loff_t, BufferHead*>::iterator p = ob->data.begin(); + auto p = ob->data.begin(); while (p != ob->data.end()) { BufferHead *bh = p->second; // current iterator will be invalidated by bh_remove() @@ -897,7 +899,7 @@ void ObjectCacher::bh_read_finish(int64_t poolid, sobject_t oid, // apply to bh's! loff_t opos = start; while (true) { - map<loff_t, BufferHead*>::const_iterator p = ob->data_lower_bound(opos); + auto p = ob->data_lower_bound(opos); if (p == ob->data.end()) break; if (opos >= start+(loff_t)length) { @@ -911,8 +913,7 @@ void ObjectCacher::bh_read_finish(int64_t poolid, sobject_t oid, ldout(cct, 20) << "checking bh " << *bh << dendl; // finishers? - for (map<loff_t, list<Context*> >::iterator it - = bh->waitfor_read.begin(); + for (auto it = bh->waitfor_read.begin(); it != bh->waitfor_read.end(); ++it) ls.splice(ls.end(), it->second); diff --git a/src/osdc/ObjectCacher.h b/src/osdc/ObjectCacher.h index bc6133651e9..d5a77cd18aa 100644 --- a/src/osdc/ObjectCacher.h +++ b/src/osdc/ObjectCacher.h @@ -61,34 +61,34 @@ class ObjectCacher { // read scatter/gather struct OSDRead { - vector<ObjectExtent> extents; + std::vector<ObjectExtent> extents; snapid_t snap; - bufferlist *bl; + ceph::buffer::list *bl; int fadvise_flags; - OSDRead(snapid_t s, bufferlist *b, int f) + OSDRead(snapid_t s, ceph::buffer::list *b, int f) : snap(s), bl(b), fadvise_flags(f) {} }; - OSDRead *prepare_read(snapid_t snap, bufferlist *b, int f) const { + OSDRead *prepare_read(snapid_t snap, ceph::buffer::list *b, int f) const { return new OSDRead(snap, b, f); } // write scatter/gather struct OSDWrite { - vector<ObjectExtent> extents; + std::vector<ObjectExtent> extents; SnapContext snapc; - bufferlist bl; + ceph::buffer::list bl; ceph::real_time mtime; int fadvise_flags; ceph_tid_t journal_tid; - OSDWrite(const SnapContext& sc, const bufferlist& b, ceph::real_time mt, + OSDWrite(const SnapContext& sc, const ceph::buffer::list& b, ceph::real_time mt, int f, ceph_tid_t _journal_tid) : snapc(sc), bl(b), mtime(mt), fadvise_flags(f), journal_tid(_journal_tid) {} }; OSDWrite *prepare_write(const SnapContext& sc, - const bufferlist &b, + const ceph::buffer::list &b, ceph::real_time mt, int f, ceph_tid_t journal_tid) const { @@ -121,7 +121,7 @@ class ObjectCacher { public: Object *ob; - bufferlist bl; + ceph::buffer::list bl; ceph_tid_t last_write_tid; // version of bh (if non-zero) ceph_tid_t last_read_tid; // tid of last read op (if any) ceph::real_time last_write; @@ -129,7 +129,7 @@ class ObjectCacher { ceph_tid_t journal_tid; int error; // holds return value for failed reads - map<loff_t, list<Context*> > waitfor_read; + std::map<loff_t, std::list<Context*> > waitfor_read; // cons explicit BufferHead(Object *o) : @@ -243,14 +243,14 @@ class ObjectCacher { bool complete; bool exists; - map<loff_t, BufferHead*> data; + std::map<loff_t, BufferHead*> data; ceph_tid_t last_write_tid; // version of bh (if non-zero) ceph_tid_t last_commit_tid; // last update committed. int dirty_or_tx; - map< ceph_tid_t, list<Context*> > waitfor_commit; + std::map< ceph_tid_t, std::list<Context*> > waitfor_commit; xlist<C_ReadFinish*> reads; Object(const Object&) = delete; @@ -280,7 +280,7 @@ class ObjectCacher { object_t get_oid() { return oid.oid; } snapid_t get_snap() { return oid.snap; } ObjectSet *get_object_set() const { return oset; } - string get_namespace() { return oloc.nspace; } + std::string get_namespace() { return oloc.nspace; } uint64_t get_object_number() const { return object_no; } const object_locator_t& get_oloc() const { return oloc; } @@ -309,8 +309,8 @@ class ObjectCacher { * @param offset object byte offset * @return iterator pointing to buffer, or data.end() */ - map<loff_t,BufferHead*>::const_iterator data_lower_bound(loff_t offset) const { - map<loff_t,BufferHead*>::const_iterator p = data.lower_bound(offset); + std::map<loff_t,BufferHead*>::const_iterator data_lower_bound(loff_t offset) const { + auto p = data.lower_bound(offset); if (p != data.begin() && (p == data.end() || p->first > offset)) { --p; // might overlap! @@ -347,10 +347,10 @@ class ObjectCacher { bool is_cached(loff_t off, loff_t len) const; bool include_all_cached_data(loff_t off, loff_t len); int map_read(ObjectExtent &ex, - map<loff_t, BufferHead*>& hits, - map<loff_t, BufferHead*>& missing, - map<loff_t, BufferHead*>& rx, - map<loff_t, BufferHead*>& errors); + std::map<loff_t, BufferHead*>& hits, + std::map<loff_t, BufferHead*>& missing, + std::map<loff_t, BufferHead*>& rx, + std::map<loff_t, BufferHead*>& errors); BufferHead *map_write(ObjectExtent &ex, ceph_tid_t tid); void replace_journal_tid(BufferHead *bh, ceph_tid_t tid); @@ -398,7 +398,7 @@ class ObjectCacher { WritebackHandler& writeback_handler; bool scattered_write; - string name; + std::string name; ceph::mutex& lock; uint64_t max_dirty, target_dirty, max_size, max_objects; @@ -411,13 +411,13 @@ class ObjectCacher { void *flush_set_callback_arg; // indexed by pool_id - vector<ceph::unordered_map<sobject_t, Object*> > objects; + std::vector<ceph::unordered_map<sobject_t, Object*> > objects; - list<Context*> waitfor_read; + std::list<Context*> waitfor_read; ceph_tid_t last_read_tid; - set<BufferHead*, BufferHead::ptr_lt> dirty_or_tx_bh; + std::set<BufferHead*, BufferHead::ptr_lt> dirty_or_tx_bh; LRU bh_lru_dirty, bh_lru_rest; LRU ob_lru; @@ -529,7 +529,7 @@ class ObjectCacher { void bh_read(BufferHead *bh, int op_flags, const ZTracer::Trace &parent_trace); void bh_write(BufferHead *bh, const ZTracer::Trace &parent_trace); - void bh_write_scattered(list<BufferHead*>& blist); + void bh_write_scattered(std::list<BufferHead*>& blist); void bh_write_adjacencies(BufferHead *bh, ceph::real_time cutoff, int64_t *amount, int *max_count); @@ -562,10 +562,10 @@ class ObjectCacher { public: void bh_read_finish(int64_t poolid, sobject_t oid, ceph_tid_t tid, loff_t offset, uint64_t length, - bufferlist &bl, int r, + ceph::buffer::list &bl, int r, bool trust_enoent); void bh_write_commit(int64_t poolid, sobject_t oid, - vector<pair<loff_t, uint64_t> >& ranges, + std::vector<std::pair<loff_t, uint64_t> >& ranges, ceph_tid_t t, int r); class C_WriteCommit; @@ -576,7 +576,7 @@ class ObjectCacher { - ObjectCacher(CephContext *cct_, string name, WritebackHandler& wb, ceph::mutex& l, + ObjectCacher(CephContext *cct_, std::string name, WritebackHandler& wb, ceph::mutex& l, flush_set_callback_t flush_callback, void *flush_callback_arg, uint64_t max_bytes, uint64_t max_objects, @@ -610,7 +610,7 @@ class ObjectCacher { ZTracer::Trace *parent_trace = nullptr); int writex(OSDWrite *wr, ObjectSet *oset, Context *onfreespace, ZTracer::Trace *parent_trace = nullptr); - bool is_cached(ObjectSet *oset, vector<ObjectExtent>& extents, + bool is_cached(ObjectSet *oset, std::vector<ObjectExtent>& extents, snapid_t snapid); private: @@ -620,7 +620,7 @@ private: void _maybe_wait_for_writeback(uint64_t len, ZTracer::Trace *trace); bool _flush_set_finish(C_GatherBuilder *gather, Context *onfinish); - void _discard(ObjectSet *oset, const vector<ObjectExtent>& exls, + void _discard(ObjectSet *oset, const std::vector<ObjectExtent>& exls, C_GatherBuilder* gather); void _discard_finish(ObjectSet *oset, bool was_dirty, Context* on_finish); @@ -630,7 +630,7 @@ public: bool set_is_dirty_or_committing(ObjectSet *oset); bool flush_set(ObjectSet *oset, Context *onfinish=0); - bool flush_set(ObjectSet *oset, vector<ObjectExtent>& ex, + bool flush_set(ObjectSet *oset, std::vector<ObjectExtent>& ex, ZTracer::Trace *trace, Context *onfinish = 0); bool flush_all(Context *onfinish = 0); @@ -640,8 +640,8 @@ public: loff_t release_set(ObjectSet *oset); uint64_t release_all(); - void discard_set(ObjectSet *oset, const vector<ObjectExtent>& ex); - void discard_writeback(ObjectSet *oset, const vector<ObjectExtent>& ex, + void discard_set(ObjectSet *oset, const std::vector<ObjectExtent>& ex); + void discard_writeback(ObjectSet *oset, const std::vector<ObjectExtent>& ex, Context* on_finish); /** @@ -664,7 +664,7 @@ public: max_size = v; } void set_max_dirty_age(double a) { - max_dirty_age = make_timespan(a); + max_dirty_age = ceph::make_timespan(a); } void set_max_objects(int64_t v) { max_objects = v; @@ -676,14 +676,14 @@ public: /*** async+caching (non-blocking) file interface ***/ int file_is_cached(ObjectSet *oset, file_layout_t *layout, snapid_t snapid, loff_t offset, uint64_t len) { - vector<ObjectExtent> extents; + std::vector<ObjectExtent> extents; Striper::file_to_extents(cct, oset->ino, layout, offset, len, oset->truncate_size, extents); return is_cached(oset, extents, snapid); } int file_read(ObjectSet *oset, file_layout_t *layout, snapid_t snapid, - loff_t offset, uint64_t len, bufferlist *bl, int flags, + loff_t offset, uint64_t len, ceph::buffer::list *bl, int flags, Context *onfinish) { OSDRead *rd = prepare_read(snapid, bl, flags); Striper::file_to_extents(cct, oset->ino, layout, offset, len, @@ -693,7 +693,7 @@ public: int file_write(ObjectSet *oset, file_layout_t *layout, const SnapContext& snapc, loff_t offset, uint64_t len, - bufferlist& bl, ceph::real_time mtime, int flags) { + ceph::buffer::list& bl, ceph::real_time mtime, int flags) { OSDWrite *wr = prepare_write(snapc, bl, mtime, flags, 0); Striper::file_to_extents(cct, oset->ino, layout, offset, len, oset->truncate_size, wr->extents); @@ -703,7 +703,7 @@ public: bool file_flush(ObjectSet *oset, file_layout_t *layout, const SnapContext& snapc, loff_t offset, uint64_t len, Context *onfinish) { - vector<ObjectExtent> extents; + std::vector<ObjectExtent> extents; Striper::file_to_extents(cct, oset->ino, layout, offset, len, oset->truncate_size, extents); ZTracer::Trace trace; @@ -712,7 +712,8 @@ public: }; -inline ostream& operator<<(ostream &out, const ObjectCacher::BufferHead &bh) +inline std::ostream& operator<<(std::ostream &out, + const ObjectCacher::BufferHead &bh) { out << "bh[ " << &bh << " " << bh.start() << "~" << bh.length() @@ -732,11 +733,9 @@ inline ostream& operator<<(ostream &out, const ObjectCacher::BufferHead &bh) if (bh.error) out << " error=" << bh.error; out << "]"; out << " waiters = {"; - for (map<loff_t, list<Context*> >::const_iterator it - = bh.waitfor_read.begin(); - it != bh.waitfor_read.end(); ++it) { + for (auto it = bh.waitfor_read.begin(); it != bh.waitfor_read.end(); ++it) { out << " " << it->first << "->["; - for (list<Context*>::const_iterator lit = it->second.begin(); + for (auto lit = it->second.begin(); lit != it->second.end(); ++lit) { out << *lit << ", "; } @@ -746,7 +745,8 @@ inline ostream& operator<<(ostream &out, const ObjectCacher::BufferHead &bh) return out; } -inline ostream& operator<<(ostream &out, const ObjectCacher::ObjectSet &os) +inline std::ostream& operator<<(std::ostream &out, + const ObjectCacher::ObjectSet &os) { return out << "objectset[" << os.ino << " ts " << os.truncate_seq << "/" << os.truncate_size @@ -755,10 +755,11 @@ inline ostream& operator<<(ostream &out, const ObjectCacher::ObjectSet &os) << "]"; } -inline ostream& operator<<(ostream &out, const ObjectCacher::Object &ob) +inline std::ostream& operator<<(std::ostream &out, + const ObjectCacher::Object &ob) { out << "object[" - << ob.get_soid() << " oset " << ob.oset << dec + << ob.get_soid() << " oset " << ob.oset << std::dec << " wr " << ob.last_write_tid << "/" << ob.last_commit_tid; if (ob.complete) diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 9a63f64f13b..d56a76dbd8d 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -4518,7 +4518,7 @@ void Objecter::_dump_ops(const OSDSession *s, Formatter *fmt) p != s->ops.end(); ++p) { Op *op = p->second; - auto age = std::chrono::duration<double>(coarse_mono_clock::now() - op->stamp); + auto age = std::chrono::duration<double>(ceph::coarse_mono_clock::now() - op->stamp); fmt->open_object_section("op"); fmt->dump_unsigned("tid", op->tid); op->target.dump(fmt); diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 8db78558901..91ebc0a14db 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -1004,7 +1004,8 @@ struct ObjectOperation { } void omap_rm_range(std::string_view key_begin, std::string_view key_end) { - bufferlist bl; + ceph::buffer::list bl; + using ceph::encode; encode(key_begin, bl); encode(key_end, bl); add_data(CEPH_OSD_OP_OMAPRMKEYRANGE, 0, bl.length(), bl); @@ -2108,7 +2109,7 @@ private: return op_budget; } int take_linger_budget(LingerOp *info); - friend class WatchContext; // to invoke put_up_budget_bytes + friend struct WatchContext; // to invoke put_up_budget_bytes void put_op_budget_bytes(int op_budget) { ceph_assert(op_budget >= 0); op_throttle_bytes.put(op_budget); diff --git a/src/osdc/Striper.h b/src/osdc/Striper.h index 85b99f08fd0..ddfb2c570ed 100644 --- a/src/osdc/Striper.h +++ b/src/osdc/Striper.h @@ -122,7 +122,7 @@ private: void add_partial_sparse_result( - CephContext *cct, bufferlist& bl, + CephContext *cct, ceph::buffer::list& bl, std::map<uint64_t, uint64_t>::const_iterator* it, const std::map<uint64_t, uint64_t>::const_iterator& end_it, uint64_t* bl_off, uint64_t tofs, uint64_t tlen); diff --git a/src/osdc/WritebackHandler.h b/src/osdc/WritebackHandler.h index ef3b7f6efd1..4f4e9aef87f 100644 --- a/src/osdc/WritebackHandler.h +++ b/src/osdc/WritebackHandler.h @@ -15,7 +15,7 @@ class WritebackHandler { virtual void read(const object_t& oid, uint64_t object_no, const object_locator_t& oloc, uint64_t off, uint64_t len, - snapid_t snapid, bufferlist *pbl, uint64_t trunc_size, + snapid_t snapid, ceph::buffer::list *pbl, uint64_t trunc_size, __u32 trunc_seq, int op_flags, const ZTracer::Trace &parent_trace, Context *onfinish) = 0; /** @@ -34,7 +34,7 @@ class WritebackHandler { virtual ceph_tid_t write(const object_t& oid, const object_locator_t& oloc, uint64_t off, uint64_t len, const SnapContext& snapc, - const bufferlist &bl, ceph::real_time mtime, + const ceph::buffer::list &bl, ceph::real_time mtime, uint64_t trunc_size, __u32 trunc_seq, ceph_tid_t journal_tid, const ZTracer::Trace &parent_trace, @@ -46,7 +46,7 @@ class WritebackHandler { virtual bool can_scattered_write() { return false; } virtual ceph_tid_t write(const object_t& oid, const object_locator_t& oloc, - vector<pair<uint64_t, bufferlist> >& io_vec, + std::vector<std::pair<uint64_t, ceph::buffer::list> >& io_vec, const SnapContext& snapc, ceph::real_time mtime, uint64_t trunc_size, __u32 trunc_seq, Context *oncommit) { diff --git a/src/pybind/cephfs/cephfs.pyx b/src/pybind/cephfs/cephfs.pyx index 904ff177481..ef092e62431 100644 --- a/src/pybind/cephfs/cephfs.pyx +++ b/src/pybind/cephfs/cephfs.pyx @@ -68,7 +68,7 @@ cdef extern from "sys/statvfs.h": unsigned long int f_padding[32] -IF UNAME_SYSNAME == "FreeBSD": +IF UNAME_SYSNAME == "FreeBSD" or UNAME_SYSNAME == "Darwin": cdef extern from "dirent.h": cdef struct dirent: long int d_ino @@ -371,14 +371,14 @@ cdef class DirResult(object): if not dirent: return None - IF UNAME_SYSNAME == "FreeBSD": + IF UNAME_SYSNAME == "FreeBSD" or UNAME_SYSNAME == "Darwin": return DirEntry(d_ino=dirent.d_ino, d_off=0, d_reclen=dirent.d_reclen, d_type=dirent.d_type, d_name=dirent.d_name) ELSE: - return DirEntry(d_ino=dirent.d_ino, + return DirEntry(d_ino=dirent.d_ino, d_off=dirent.d_off, d_reclen=dirent.d_reclen, d_type=dirent.d_type, diff --git a/src/pybind/cephfs/setup.py b/src/pybind/cephfs/setup.py index 19ae6c329af..9d2e672e944 100755 --- a/src/pybind/cephfs/setup.py +++ b/src/pybind/cephfs/setup.py @@ -61,17 +61,20 @@ __version__ = '2.0.0' def get_python_flags(libs): py_libs = sum((libs.split() for libs in distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), []) + ldflags = list(filterfalse(lambda lib: lib.startswith('-l'), py_libs)) + py_libs = [lib.replace('-l', '') for lib in + filter(lambda lib: lib.startswith('-l'), py_libs)] compiler = new_compiler() distutils.sysconfig.customize_compiler(compiler) return dict( include_dirs=[distutils.sysconfig.get_python_inc()], library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), - libraries=libs + [lib.replace('-l', '') for lib in py_libs], + libraries=libs + py_libs, extra_compile_args=filter_unsupported_flags( compiler.compiler[0], distutils.sysconfig.get_config_var('CFLAGS').split()), extra_link_args=(distutils.sysconfig.get_config_var('LDFLAGS').split() + - distutils.sysconfig.get_config_var('LINKFORSHARED').split())) + ldflags)) def check_sanity(): diff --git a/src/pybind/mgr/CMakeLists.txt b/src/pybind/mgr/CMakeLists.txt index f7bf96701fe..8c544eb4180 100644 --- a/src/pybind/mgr/CMakeLists.txt +++ b/src/pybind/mgr/CMakeLists.txt @@ -2,8 +2,9 @@ if(WITH_MGR_DASHBOARD_FRONTEND) add_subdirectory(dashboard) endif() add_subdirectory(insights) -add_subdirectory(rook) - +if(WITH_MGR_ROOK_CLIENT) + add_subdirectory(rook) +endif() if(WITH_TESTS) include(AddCephTest) add_tox_test(mgr ${CMAKE_CURRENT_SOURCE_DIR} TOX_ENVS mypy) diff --git a/src/pybind/mgr/dashboard/CMakeLists.txt b/src/pybind/mgr/dashboard/CMakeLists.txt index 9a8a03f0a8f..7d871f986db 100644 --- a/src/pybind/mgr/dashboard/CMakeLists.txt +++ b/src/pybind/mgr/dashboard/CMakeLists.txt @@ -37,6 +37,7 @@ else() COMMENT "dashboard nodeenv is being installed" ) add_custom_target(mgr-dashboard-nodeenv + COMMAND . ${mgr-dashboard-nodeenv-dir}/bin/activate && npm config set python ${MGR_PYTHON_EXECUTABLE} && deactivate DEPENDS ${mgr-dashboard-nodeenv-dir}/bin/npm WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/src/pybind/mgr/dashboard/controllers/health.py b/src/pybind/mgr/dashboard/controllers/health.py index 2795d89ce50..35e7b07b216 100644 --- a/src/pybind/mgr/dashboard/controllers/health.py +++ b/src/pybind/mgr/dashboard/controllers/health.py @@ -106,7 +106,6 @@ class HealthData(object): fs_map = mgr.get('fs_map') if self._minimal: fs_map = partial_dict(fs_map, ['filesystems', 'standbys']) - fs_map['standbys'] = [{}] * len(fs_map['standbys']) fs_map['filesystems'] = [partial_dict(item, ['mdsmap']) for item in fs_map['filesystems']] for fs in fs_map['filesystems']: @@ -114,7 +113,6 @@ class HealthData(object): min_mdsmap_info = dict() for k, v in mdsmap_info.items(): min_mdsmap_info[k] = partial_dict(v, ['state']) - fs['mdsmap'] = dict(info=min_mdsmap_info) return fs_map def host_count(self): @@ -135,7 +133,6 @@ class HealthData(object): mgr_map = mgr.get('mgr_map') if self._minimal: mgr_map = partial_dict(mgr_map, ['active_name', 'standbys']) - mgr_map['standbys'] = [{}] * len(mgr_map['standbys']) return mgr_map def mon_status(self): diff --git a/src/pybind/mgr/dashboard/frontend/e2e/cluster/mgr-modules.e2e-spec.ts b/src/pybind/mgr/dashboard/frontend/e2e/cluster/mgr-modules.e2e-spec.ts index 56a9d4cae6d..d14f35a4514 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/cluster/mgr-modules.e2e-spec.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/cluster/mgr-modules.e2e-spec.ts @@ -27,7 +27,10 @@ describe('Manager modules page', () => { }); it('should test editing on diskprediction_local module', async () => { - const diskpredLocalArr = [['11', 'predict_interval'], ['0122', 'sleep_interval']]; + const diskpredLocalArr = [ + ['11', 'predict_interval'], + ['0122', 'sleep_interval'] + ]; await mgrmodules.editMgrModule('diskprediction_local', diskpredLocalArr); }); @@ -37,7 +40,10 @@ describe('Manager modules page', () => { }); it('should test editing on dashboard module', async () => { - const dashboardArr = [['rq', 'RGW_API_USER_ID'], ['rafa', 'GRAFANA_API_PASSWORD']]; + const dashboardArr = [ + ['rq', 'RGW_API_USER_ID'], + ['rafa', 'GRAFANA_API_PASSWORD'] + ]; await mgrmodules.editMgrModule('dashboard', dashboardArr); }); diff --git a/src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts b/src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts index 55b84eaed49..aea78626d87 100644 --- a/src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts +++ b/src/pybind/mgr/dashboard/frontend/e2e/page-helper.po.ts @@ -327,9 +327,9 @@ export abstract class PageHelper { * Uncheck all checked table rows. */ async uncheckAllTableRows() { - await $$('.datatable-body-cell-label .datatable-checkbox input[type=checkbox]:checked').each( - (e: ElementFinder) => e.click() - ); + await $$( + '.datatable-body-cell-label .datatable-checkbox input[type=checkbox]:checked' + ).each((e: ElementFinder) => e.click()); } async filterTable(name: string, option: string) { diff --git a/src/pybind/mgr/dashboard/frontend/package-lock.json b/src/pybind/mgr/dashboard/frontend/package-lock.json index a042d28572f..e8905585a24 100644 --- a/src/pybind/mgr/dashboard/frontend/package-lock.json +++ b/src/pybind/mgr/dashboard/frontend/package-lock.json @@ -5,12 +5,12 @@ "requires": true, "dependencies": { "@angular-devkit/architect": { - "version": "0.803.23", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.803.23.tgz", - "integrity": "sha512-BRDbnmdULrle2l7WFZHEW/OAwS8RRg08+jiNG3gEP0BxDN6QMNMKmWhxmX67pgq3e/xMvu2DH0z71mAPNtJDAw==", + "version": "0.803.25", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.803.25.tgz", + "integrity": "sha512-usV/zEncKCKQuF6AD3pRU6N5i5fbaAux/qZb+nbOz9/2G5jrXwe5sH+y3vxbgqB83e3LqusEQCTu7/tfg6LwZg==", "dev": true, "requires": { - "@angular-devkit/core": "8.3.23", + "@angular-devkit/core": "8.3.25", "rxjs": "6.4.0" }, "dependencies": { @@ -26,27 +26,27 @@ } }, "@angular-devkit/build-angular": { - "version": "0.803.23", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.803.23.tgz", - "integrity": "sha512-hlaDMuScRbgdsH3Toyze5G5NhmJypWIPGcIt4CAcXAnVdSltrBPKzu5Psr+ACcDLH3TYtlMKBrkAG9xXS3it1g==", - "dev": true, - "requires": { - "@angular-devkit/architect": "0.803.23", - "@angular-devkit/build-optimizer": "0.803.23", - "@angular-devkit/build-webpack": "0.803.23", - "@angular-devkit/core": "8.3.23", - "@babel/core": "7.7.5", - "@babel/preset-env": "7.7.6", - "@ngtools/webpack": "8.3.23", + "version": "0.803.25", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.803.25.tgz", + "integrity": "sha512-WY0E7NgXuog3phhz5ZdutZPWQ9nbOr+omGN5KI1e8MZs1sJO4xkyaGRT8zOulkogkqJ2NboTBq3j9uSbZkcYeg==", + "dev": true, + "requires": { + "@angular-devkit/architect": "0.803.25", + "@angular-devkit/build-optimizer": "0.803.25", + "@angular-devkit/build-webpack": "0.803.25", + "@angular-devkit/core": "8.3.25", + "@babel/core": "7.8.3", + "@babel/preset-env": "7.8.3", + "@ngtools/webpack": "8.3.25", "ajv": "6.10.2", "autoprefixer": "9.6.1", - "browserslist": "4.8.3", + "browserslist": "4.8.6", "cacache": "12.0.2", - "caniuse-lite": "1.0.30001019", + "caniuse-lite": "1.0.30001024", "circular-dependency-plugin": "5.2.0", "clean-css": "4.2.1", "copy-webpack-plugin": "5.1.1", - "core-js": "3.2.1", + "core-js": "3.6.4", "coverage-istanbul-loader": "2.0.3", "file-loader": "4.2.0", "find-cache-dir": "3.0.0", @@ -77,7 +77,7 @@ "style-loader": "1.0.0", "stylus": "0.54.5", "stylus-loader": "3.0.2", - "terser": "4.3.9", + "terser": "4.6.3", "terser-webpack-plugin": "1.4.3", "tree-kill": "1.2.2", "webpack": "4.39.2", @@ -89,18 +89,6 @@ "worker-plugin": "3.2.0" }, "dependencies": { - "caniuse-lite": { - "version": "1.0.30001019", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001019.tgz", - "integrity": "sha512-6ljkLtF1KM5fQ+5ZN0wuyVvvebJxgJPTmScOMaFuQN2QuOzvRJnWSKfzQskQU5IOU4Gap3zasYPIinzwUjoj/g==", - "dev": true - }, - "core-js": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.2.1.tgz", - "integrity": "sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==", - "dev": true - }, "glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -127,9 +115,9 @@ } }, "@angular-devkit/build-optimizer": { - "version": "0.803.23", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.803.23.tgz", - "integrity": "sha512-0MJAnGjpmE1hNrwDBi/7b9G1qyt2qN/wcZOj6QseZeWuoxIVXIWgdM6gBpJdgB7HI7vv4l4LpyFX9Doq+2r7Xg==", + "version": "0.803.25", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.803.25.tgz", + "integrity": "sha512-MiQimuEs8QeM3xo7bR3Yk1OWHHlp2pGCc2GLUMIcWhKqM+QjoRky0HoGoBazbznx292l+xjFjANvPEKbqJ2v7Q==", "dev": true, "requires": { "loader-utils": "1.2.3", @@ -140,13 +128,13 @@ } }, "@angular-devkit/build-webpack": { - "version": "0.803.23", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.803.23.tgz", - "integrity": "sha512-ttsvUpoMHAr84I3YQmr2Yyu1qPIjw3m+aYgeEh1cAN+Ck8/F/q+Z+nWsmcgIXEC2f8xN7uZWy4PIkCZR8YETOg==", + "version": "0.803.25", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.803.25.tgz", + "integrity": "sha512-WR7HWJIWL6TB3WHG7ZFn8s0z3WlojeQlod75UIKl5i+f4OU90kp8kxcoH5G6OCXu56x5w40oIi1ve5ljjWSJkw==", "dev": true, "requires": { - "@angular-devkit/architect": "0.803.23", - "@angular-devkit/core": "8.3.23", + "@angular-devkit/architect": "0.803.25", + "@angular-devkit/core": "8.3.25", "rxjs": "6.4.0" }, "dependencies": { @@ -162,9 +150,9 @@ } }, "@angular-devkit/core": { - "version": "8.3.23", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-8.3.23.tgz", - "integrity": "sha512-y++LN6R/fu+obPUKEMDSKZ5FzeWN5rV0Z8vrdC+uF02VJLv/5QI/dUx3ROKFzJO3m2LU6EAuo5b/TLAPq4ving==", + "version": "8.3.25", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-8.3.25.tgz", + "integrity": "sha512-l7Gqy1tMrTpRmPVlovcFX8UA3mtXRlgO8kcSsbJ9MKRKNTCcxlfsWEYY5igyDBUVh6ADkgSIu0nuk31ZGTe0lw==", "dev": true, "requires": { "ajv": "6.10.2", @@ -186,12 +174,12 @@ } }, "@angular-devkit/schematics": { - "version": "8.3.23", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-8.3.23.tgz", - "integrity": "sha512-O8i/vn6YfqbT0q7o4jsVOTnWE07T1tcvk2zJ4O/1ete2z+Z2aw1YtIddwXEGJNCDpeE0B7f2sUHoLOS4Jc4O9w==", + "version": "8.3.25", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-8.3.25.tgz", + "integrity": "sha512-/p1MkfursfLy+JRGXlJGPEmX55lrFCsR/2khWAVXZcMaFR3QlR/b6/zvB8I2pHFfr0/XWnYTT/BsF7rJjO3RmA==", "dev": true, "requires": { - "@angular-devkit/core": "8.3.23", + "@angular-devkit/core": "8.3.25", "rxjs": "6.4.0" }, "dependencies": { @@ -215,16 +203,16 @@ } }, "@angular/cli": { - "version": "8.3.23", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-8.3.23.tgz", - "integrity": "sha512-umr5puS6j8elTIhhsjyb/psTmwL00oeBbsnnz5K3fkbWB2wgdMsJvLi9aR/oAyh2NlSA2ZzgB62I38VjoDR0yQ==", + "version": "8.3.25", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-8.3.25.tgz", + "integrity": "sha512-CPJI5nnbBvvyBUFwOHfRXy/KVwsiYlcbDAeIk1klcjQjbVFYZbnY0iAhNupy9j7rPQhb7jle5oslU3TLfbqOTQ==", "dev": true, "requires": { - "@angular-devkit/architect": "0.803.23", - "@angular-devkit/core": "8.3.23", - "@angular-devkit/schematics": "8.3.23", - "@schematics/angular": "8.3.23", - "@schematics/update": "0.803.23", + "@angular-devkit/architect": "0.803.25", + "@angular-devkit/core": "8.3.25", + "@angular-devkit/schematics": "8.3.25", + "@schematics/angular": "8.3.25", + "@schematics/update": "0.803.25", "@yarnpkg/lockfile": "1.1.0", "ansi-colors": "4.1.1", "debug": "^4.1.1", @@ -300,7 +288,7 @@ "convert-source-map": "^1.5.1", "dependency-graph": "^0.7.2", "magic-string": "^0.25.0", - "minimist": "^1.2.0", + "minimist": "1.2.5", "reflect-metadata": "^0.1.2", "source-map": "^0.6.1", "tslib": "^1.9.0", @@ -373,7 +361,7 @@ "anymatch": "^2.0.0", "async-each": "^1.0.1", "braces": "^2.3.2", - "fsevents": "^1.2.7", + "fsevents": "2.1.2", "glob-parent": "^3.1.0", "inherits": "^2.0.3", "is-binary-path": "^1.0.0", @@ -385,562 +373,7 @@ }, "dependencies": { "fsevents": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", - "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1", - "node-pre-gyp": "*" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "3.2.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.9.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.14.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.1", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.13", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.1.1", - "bundled": true, - "dev": true, - "optional": true - } - } + "version": "2.1.2" } } }, @@ -1032,28 +465,34 @@ } }, "fsevents": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", - "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "dev": true, + "optional": true, + "requires": { + "node-pre-gyp": "*" + }, "dependencies": { "abbrev": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", "bundled": true, + "dev": true, "optional": true }, "aproba": { "version": "1.2.0", "bundled": true, + "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", "bundled": true, + "dev": true, "optional": true, "requires": { "delegates": "^1.0.0", @@ -1063,11 +502,13 @@ "balanced-match": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "dev": true, "optional": true, "requires": { "balanced-match": "^1.0.0", @@ -1077,31 +518,37 @@ "chownr": { "version": "1.1.3", "bundled": true, + "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", "bundled": true, + "dev": true, "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, + "dev": true, "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, + "dev": true, "optional": true }, "core-util-is": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "debug": { "version": "3.2.6", "bundled": true, + "dev": true, "optional": true, "requires": { "ms": "^2.1.1" @@ -1110,21 +557,25 @@ "deep-extend": { "version": "0.6.0", "bundled": true, + "dev": true, "optional": true }, "delegates": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", "bundled": true, + "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.7", "bundled": true, + "dev": true, "optional": true, "requires": { "minipass": "^2.6.0" @@ -1133,11 +584,13 @@ "fs.realpath": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "gauge": { "version": "2.7.4", "bundled": true, + "dev": true, "optional": true, "requires": { "aproba": "^1.0.3", @@ -1153,6 +606,7 @@ "glob": { "version": "7.1.6", "bundled": true, + "dev": true, "optional": true, "requires": { "fs.realpath": "^1.0.0", @@ -1166,11 +620,13 @@ "has-unicode": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.24", "bundled": true, + "dev": true, "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -1179,6 +635,7 @@ "ignore-walk": { "version": "3.0.3", "bundled": true, + "dev": true, "optional": true, "requires": { "minimatch": "^3.0.4" @@ -1187,6 +644,7 @@ "inflight": { "version": "1.0.6", "bundled": true, + "dev": true, "optional": true, "requires": { "once": "^1.3.0", @@ -1196,16 +654,19 @@ "inherits": { "version": "2.0.4", "bundled": true, + "dev": true, "optional": true }, "ini": { "version": "1.3.5", "bundled": true, + "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true, "requires": { "number-is-nan": "^1.0.0" @@ -1214,24 +675,27 @@ "isarray": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", "bundled": true, + "dev": true, "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "0.0.8", - "bundled": true, - "optional": true + "dev": true, + "optional": true, + "version": "1.2.5" }, "minipass": { "version": "2.9.0", "bundled": true, + "dev": true, "optional": true, "requires": { "safe-buffer": "^5.1.2", @@ -1241,6 +705,7 @@ "minizlib": { "version": "1.3.3", "bundled": true, + "dev": true, "optional": true, "requires": { "minipass": "^2.9.0" @@ -1249,19 +714,27 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "dev": true, "optional": true, "requires": { - "minimist": "0.0.8" + "minimist": "1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5" + } } }, "ms": { "version": "2.1.2", "bundled": true, + "dev": true, "optional": true }, "needle": { "version": "2.4.0", "bundled": true, + "dev": true, "optional": true, "requires": { "debug": "^3.2.6", @@ -1272,6 +745,8 @@ "node-pre-gyp": { "version": "0.14.0", "bundled": true, + "dev": true, + "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", @@ -1288,6 +763,7 @@ "nopt": { "version": "4.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "abbrev": "1", @@ -1297,6 +773,7 @@ "npm-bundled": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true, "requires": { "npm-normalize-package-bin": "^1.0.1" @@ -1305,11 +782,13 @@ "npm-normalize-package-bin": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "npm-packlist": { "version": "1.4.7", "bundled": true, + "dev": true, "optional": true, "requires": { "ignore-walk": "^3.0.1", @@ -1319,6 +798,7 @@ "npmlog": { "version": "4.1.2", "bundled": true, + "dev": true, "optional": true, "requires": { "are-we-there-yet": "~1.1.2", @@ -1330,16 +810,19 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", "bundled": true, + "dev": true, "optional": true }, "once": { "version": "1.4.0", "bundled": true, + "dev": true, "optional": true, "requires": { "wrappy": "1" @@ -1348,16 +831,19 @@ "os-homedir": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "osenv": { "version": "0.1.5", "bundled": true, + "dev": true, "optional": true, "requires": { "os-homedir": "^1.0.0", @@ -1367,34 +853,36 @@ "path-is-absolute": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "rc": { "version": "1.2.8", "bundled": true, + "dev": true, "optional": true, "requires": { "deep-extend": "^0.6.0", "ini": "~1.3.0", - "minimist": "^1.2.0", + "minimist": "1.2.5", "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { - "version": "1.2.0", - "bundled": true, - "optional": true + "version": "1.2.5" } } }, "readable-stream": { "version": "2.3.6", "bundled": true, + "dev": true, "optional": true, "requires": { "core-util-is": "~1.0.0", @@ -1409,6 +897,7 @@ "rimraf": { "version": "2.7.1", "bundled": true, + "dev": true, "optional": true, "requires": { "glob": "^7.1.3" @@ -1417,36 +906,43 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, + "dev": true, "optional": true }, "safer-buffer": { "version": "2.1.2", "bundled": true, + "dev": true, "optional": true }, "sax": { "version": "1.2.4", "bundled": true, + "dev": true, "optional": true }, "semver": { "version": "5.7.1", "bundled": true, + "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", "bundled": true, + "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", "bundled": true, + "dev": true, "optional": true }, "string-width": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true, "requires": { "code-point-at": "^1.0.0", @@ -1457,6 +953,7 @@ "string_decoder": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true, "requires": { "safe-buffer": "~5.1.0" @@ -1465,6 +962,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "ansi-regex": "^2.0.0" @@ -1473,11 +971,13 @@ "strip-json-comments": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "tar": { "version": "4.4.13", "bundled": true, + "dev": true, "optional": true, "requires": { "chownr": "^1.1.1", @@ -1492,11 +992,13 @@ "util-deprecate": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "wide-align": { "version": "1.1.3", "bundled": true, + "dev": true, "optional": true, "requires": { "string-width": "^1.0.2 || 2" @@ -1505,14 +1007,17 @@ "wrappy": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "yallist": { "version": "3.1.1", "bundled": true, + "dev": true, "optional": true } - } + }, + "version": "2.1.2" }, "get-caller-file": { "version": "2.0.5", @@ -1588,19 +1093,22 @@ } }, "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "dev": true, "requires": { "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", "p-is-promise": "^2.0.0" - } + }, + "version": "4.3.0" }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimist": { + "version": "1.2.5" }, "os-locale": { "version": "3.1.0", @@ -1610,19 +1118,11 @@ "requires": { "execa": "^1.0.0", "lcid": "^2.0.0", - "mem": "^4.0.0" + "mem": "4.3.0" }, "dependencies": { "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } + "version": "4.3.0" } } }, @@ -1752,9 +1252,9 @@ } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -1826,21 +1326,41 @@ "@babel/highlight": "^7.8.3" } }, + "@babel/compat-data": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.8.6.tgz", + "integrity": "sha512-CurCIKPTkS25Mb8mz267vU95vy+TyUpnctEX2lV33xWNmHAfjruztgiPBbXZRh3xZZy1CYvGx6XfxyTVS+sk7Q==", + "dev": true, + "requires": { + "browserslist": "^4.8.5", + "invariant": "^2.2.4", + "semver": "^5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, "@babel/core": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.5.tgz", - "integrity": "sha512-M42+ScN4+1S9iB6f+TL7QBpoQETxbclx+KNoKJABghnKYE+fMzSGqst0BZJc8CpI625bwPwYgUyRvxZ+0mZzpw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.3.tgz", + "integrity": "sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA==", "dev": true, "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.4", - "@babel/helpers": "^7.7.4", - "@babel/parser": "^7.7.5", - "@babel/template": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.3", + "@babel/helpers": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", "json5": "^2.1.0", "lodash": "^4.17.13", "resolve": "^1.3.2", @@ -1849,20 +1369,19 @@ }, "dependencies": { "json5": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", - "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.2.tgz", + "integrity": "sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ==", "dev": true, "requires": { - "minimist": "^1.2.0" + "minimist": "1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5" + } } }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", @@ -1878,23 +1397,17 @@ } }, "@babel/generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.3.tgz", - "integrity": "sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==", + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.8.tgz", + "integrity": "sha512-HKyUVu69cZoclptr8t8U5b6sx6zoWjh8jiUhnuj3MpZuKT2dJ8zPTuiy31luq32swhI0SpwItCIlU8XW7BZeJg==", "dev": true, "requires": { - "@babel/types": "^7.8.3", + "@babel/types": "^7.8.7", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" }, "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -1923,24 +1436,63 @@ } }, "@babel/helper-call-delegate": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.8.3.tgz", - "integrity": "sha512-6Q05px0Eb+N4/GTyKPPvnkig7Lylw+QzihMpws9iiZQv7ZImf84ZsZpQH7QoWN4n4tm81SnSzPgHw2qtO0Zf3A==", + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.8.7.tgz", + "integrity": "sha512-doAA5LAKhsFCR0LAFIf+r2RSMmC+m8f/oQ+URnUET/rWeEzC0yTRmAGyWkD4sSu3xwbS7MYQ2u+xlt1V5R56KQ==", "dev": true, "requires": { "@babel/helper-hoist-variables": "^7.8.3", "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/types": "^7.8.7" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz", + "integrity": "sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.8.6", + "browserslist": "^4.9.1", + "invariant": "^2.2.4", + "levenary": "^1.1.1", + "semver": "^5.5.0" + }, + "dependencies": { + "browserslist": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.9.1.tgz", + "integrity": "sha512-Q0DnKq20End3raFulq6Vfp1ecB9fh8yUNV55s8sekaDDeqBaCtWlRHCUdaWyUeSSBJM7IbM6HcsyaeYqgeDhnw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001030", + "electron-to-chromium": "^1.3.363", + "node-releases": "^1.1.50" + } + }, + "caniuse-lite": { + "version": "1.0.30001035", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001035.tgz", + "integrity": "sha512-C1ZxgkuA4/bUEdMbU5WrGY4+UhMFFiXrgNAfxiMIqWgFTWfv/xsZCS2xEHT2LMq7xAZfuAnu6mcqyDl0ZR6wLQ==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.3.tgz", - "integrity": "sha512-Gcsm1OHCUr9o9TcJln57xhWHtdXbA2pgQ58S0Lxlks0WMGNXuki4+GLfX0p+L2ZkINUGZvfkz8rzoqJQSthI+Q==", + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz", + "integrity": "sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==", "dev": true, "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", "@babel/helper-regex": "^7.8.3", - "regexpu-core": "^4.6.0" + "regexpu-core": "^4.7.0" } }, "@babel/helper-define-map": { @@ -1952,14 +1504,6 @@ "@babel/helper-function-name": "^7.8.3", "@babel/types": "^7.8.3", "lodash": "^4.17.13" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "@babel/helper-explode-assignable-expression": { @@ -2020,25 +1564,18 @@ } }, "@babel/helper-module-transforms": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.8.3.tgz", - "integrity": "sha512-C7NG6B7vfBa/pwCOshpMbOYUmrYQDfCpVL/JCRu0ek8B5p8kue1+BCXpg2vOYs7w5ACB9GTOBYQ5U6NwrMg+3Q==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.8.6.tgz", + "integrity": "sha512-RDnGJSR5EFBJjG3deY0NiL0K9TO8SXxS9n/MPsbPK/s9LbQymuLNtlzvDiNS7IpecuL45cMeLVkA+HfmlrnkRg==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", "@babel/helper-simple-access": "^7.8.3", "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3", + "@babel/template": "^7.8.6", + "@babel/types": "^7.8.6", "lodash": "^4.17.13" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "@babel/helper-optimise-call-expression": { @@ -2063,14 +1600,6 @@ "dev": true, "requires": { "lodash": "^4.17.13" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "@babel/helper-remap-async-to-generator": { @@ -2087,15 +1616,15 @@ } }, "@babel/helper-replace-supers": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.3.tgz", - "integrity": "sha512-xOUssL6ho41U81etpLoT2RTdvdus4VfHamCuAm4AHxGr+0it5fnwoVdwUJ7GFEqCsQYzJUhcbsN9wB9apcYKFA==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz", + "integrity": "sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==", "dev": true, "requires": { "@babel/helper-member-expression-to-functions": "^7.8.3", "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/traverse": "^7.8.6", + "@babel/types": "^7.8.6" } }, "@babel/helper-simple-access": { @@ -2130,13 +1659,13 @@ } }, "@babel/helpers": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.3.tgz", - "integrity": "sha512-LmU3q9Pah/XyZU89QvBgGt+BCsTPoQa+73RxAQh8fb8qkDyIfeQnmgs+hvzhTCKTzqOyk7JTkS3MS1S8Mq5yrQ==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.4.tgz", + "integrity": "sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w==", "dev": true, "requires": { "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.3", + "@babel/traverse": "^7.8.4", "@babel/types": "^7.8.3" } }, @@ -2152,9 +1681,9 @@ } }, "@babel/parser": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz", - "integrity": "sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==", + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.8.tgz", + "integrity": "sha512-mO5GWzBPsPf6865iIbzNE0AvkKF3NE+2S3eRUpE+FE07BOAkXh6G+GW/Pj01hhXjve1WScbaIO4UlY1JKeqCcA==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -2188,6 +1717,16 @@ "@babel/plugin-syntax-json-strings": "^7.8.0" } }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + } + }, "@babel/plugin-proposal-object-rest-spread": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.8.3.tgz", @@ -2208,13 +1747,23 @@ "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" } }, - "@babel/plugin-proposal-unicode-property-regex": { + "@babel/plugin-proposal-optional-chaining": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.3.tgz", - "integrity": "sha512-1/1/rEZv2XGweRwwSkLpY+s60za9OZ1hJs4YDqFHCw0kYWYwL5IFljVY1MYBL+weT1l9pokDO2uhSTLVxzoHkQ==", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.8.3.tgz", + "integrity": "sha512-QIoIR9abkVn+seDE3OjA08jWcs3eZ9+wJCKSRgo3WdEU2csFYgdScb+8qHB3+WXsGJD55u+5hWCISI7ejXS+kg==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.0" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz", + "integrity": "sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.8", "@babel/helper-plugin-utils": "^7.8.3" } }, @@ -2227,6 +1776,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", @@ -2245,6 +1803,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, "@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", @@ -2263,6 +1830,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, "@babel/plugin-syntax-top-level-await": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz", @@ -2309,20 +1885,12 @@ "requires": { "@babel/helper-plugin-utils": "^7.8.3", "lodash": "^4.17.13" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "@babel/plugin-transform-classes": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.3.tgz", - "integrity": "sha512-SjT0cwFJ+7Rbr1vQsvphAHwUHvSUPmMjMU/0P59G8U2HLFqSa082JO7zkbDNWs9kH/IUqpHI6xWNesGf8haF1w==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.6.tgz", + "integrity": "sha512-k9r8qRay/R6v5aWZkrEclEhKO6mc1CCQr2dLsVHBmOQiMpN6I2bpjX3vgnldUWeEI1GHVNByULVxZ4BdP4Hmdg==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.8.3", @@ -2330,7 +1898,7 @@ "@babel/helper-function-name": "^7.8.3", "@babel/helper-optimise-call-expression": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", "@babel/helper-split-export-declaration": "^7.8.3", "globals": "^11.1.0" } @@ -2345,9 +1913,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.3.tgz", - "integrity": "sha512-H4X646nCkiEcHZUZaRkhE2XVsoz0J/1x3VVujnn96pSoGCtKPA99ZZA+va+gK+92Zycd6OBKCD8tDb/731bhgQ==", + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.8.tgz", + "integrity": "sha512-eRJu4Vs2rmttFCdhPUM3bV0Yo/xPSdPw6ML9KHs/bjB4bLA5HXlbvYXPOD5yASodGod+krjYx21xm1QmL8dCJQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3" @@ -2383,9 +1951,9 @@ } }, "@babel/plugin-transform-for-of": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.3.tgz", - "integrity": "sha512-ZjXznLNTxhpf4Q5q3x1NsngzGA38t9naWH8Gt+0qYZEJAcvPI9waSStSh56u19Ofjr7QmD0wUsQ8hw8s/p1VnA==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.6.tgz", + "integrity": "sha512-M0pw4/1/KI5WAxPsdcUL/w2LJ7o89YHN3yLkzNjg7Yl15GlVGgzHyCU+FMeAxevHGsLVmUqbirlUIKTafPmzdw==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3" @@ -2493,12 +2061,12 @@ } }, "@babel/plugin-transform-parameters": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.3.tgz", - "integrity": "sha512-/pqngtGb54JwMBZ6S/D3XYylQDFtGjWrnoCF4gXZOUpFV/ujbxnoNGNvDGu6doFWRPBveE72qTx/RRU44j5I/Q==", + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.8.tgz", + "integrity": "sha512-hC4Ld/Ulpf1psQciWWwdnUspQoQco2bMzSrwU6TmzRlvoYQe4rQFy9vnCZDTlVeCQj0JPfL+1RX0V8hCJvkgBA==", "dev": true, "requires": { - "@babel/helper-call-delegate": "^7.8.3", + "@babel/helper-call-delegate": "^7.8.7", "@babel/helper-get-function-arity": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3" } @@ -2513,12 +2081,12 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.3.tgz", - "integrity": "sha512-qt/kcur/FxrQrzFR432FGZznkVAjiyFtCOANjkAKwCbt465L6ZCiUQh2oMYGU3Wo8LRFJxNDFwWn106S5wVUNA==", + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz", + "integrity": "sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA==", "dev": true, "requires": { - "regenerator-transform": "^0.14.0" + "regenerator-transform": "^0.14.2" } }, "@babel/plugin-transform-reserved-words": { @@ -2569,9 +2137,9 @@ } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.3.tgz", - "integrity": "sha512-3TrkKd4LPqm4jHs6nPtSDI/SV9Cm5PRJkHLUgTcqRQQTMAZ44ZaAdDZJtvWFSaRcvT0a1rTmJ5ZA5tDKjleF3g==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz", + "integrity": "sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3" @@ -2588,61 +2156,67 @@ } }, "@babel/preset-env": { - "version": "7.7.6", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.7.6.tgz", - "integrity": "sha512-k5hO17iF/Q7tR9Jv8PdNBZWYW6RofxhnxKjBMc0nG4JTaWvOTiPoO/RLFwAKcA4FpmuBFm6jkoqaRJLGi0zdaQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.8.3.tgz", + "integrity": "sha512-Rs4RPL2KjSLSE2mWAx5/iCH+GC1ikKdxPrhnRS6PfFVaiZeom22VFKN4X8ZthyN61kAaR05tfXTbCvatl9WIQg==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-async-generator-functions": "^7.7.4", - "@babel/plugin-proposal-dynamic-import": "^7.7.4", - "@babel/plugin-proposal-json-strings": "^7.7.4", - "@babel/plugin-proposal-object-rest-spread": "^7.7.4", - "@babel/plugin-proposal-optional-catch-binding": "^7.7.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.7.4", - "@babel/plugin-syntax-async-generators": "^7.7.4", - "@babel/plugin-syntax-dynamic-import": "^7.7.4", - "@babel/plugin-syntax-json-strings": "^7.7.4", - "@babel/plugin-syntax-object-rest-spread": "^7.7.4", - "@babel/plugin-syntax-optional-catch-binding": "^7.7.4", - "@babel/plugin-syntax-top-level-await": "^7.7.4", - "@babel/plugin-transform-arrow-functions": "^7.7.4", - "@babel/plugin-transform-async-to-generator": "^7.7.4", - "@babel/plugin-transform-block-scoped-functions": "^7.7.4", - "@babel/plugin-transform-block-scoping": "^7.7.4", - "@babel/plugin-transform-classes": "^7.7.4", - "@babel/plugin-transform-computed-properties": "^7.7.4", - "@babel/plugin-transform-destructuring": "^7.7.4", - "@babel/plugin-transform-dotall-regex": "^7.7.4", - "@babel/plugin-transform-duplicate-keys": "^7.7.4", - "@babel/plugin-transform-exponentiation-operator": "^7.7.4", - "@babel/plugin-transform-for-of": "^7.7.4", - "@babel/plugin-transform-function-name": "^7.7.4", - "@babel/plugin-transform-literals": "^7.7.4", - "@babel/plugin-transform-member-expression-literals": "^7.7.4", - "@babel/plugin-transform-modules-amd": "^7.7.5", - "@babel/plugin-transform-modules-commonjs": "^7.7.5", - "@babel/plugin-transform-modules-systemjs": "^7.7.4", - "@babel/plugin-transform-modules-umd": "^7.7.4", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.7.4", - "@babel/plugin-transform-new-target": "^7.7.4", - "@babel/plugin-transform-object-super": "^7.7.4", - "@babel/plugin-transform-parameters": "^7.7.4", - "@babel/plugin-transform-property-literals": "^7.7.4", - "@babel/plugin-transform-regenerator": "^7.7.5", - "@babel/plugin-transform-reserved-words": "^7.7.4", - "@babel/plugin-transform-shorthand-properties": "^7.7.4", - "@babel/plugin-transform-spread": "^7.7.4", - "@babel/plugin-transform-sticky-regex": "^7.7.4", - "@babel/plugin-transform-template-literals": "^7.7.4", - "@babel/plugin-transform-typeof-symbol": "^7.7.4", - "@babel/plugin-transform-unicode-regex": "^7.7.4", - "@babel/types": "^7.7.4", - "browserslist": "^4.6.0", - "core-js-compat": "^3.4.7", + "@babel/compat-data": "^7.8.0", + "@babel/helper-compilation-targets": "^7.8.3", + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-proposal-async-generator-functions": "^7.8.3", + "@babel/plugin-proposal-dynamic-import": "^7.8.3", + "@babel/plugin-proposal-json-strings": "^7.8.3", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-proposal-object-rest-spread": "^7.8.3", + "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", + "@babel/plugin-proposal-optional-chaining": "^7.8.3", + "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.8.3", + "@babel/plugin-transform-arrow-functions": "^7.8.3", + "@babel/plugin-transform-async-to-generator": "^7.8.3", + "@babel/plugin-transform-block-scoped-functions": "^7.8.3", + "@babel/plugin-transform-block-scoping": "^7.8.3", + "@babel/plugin-transform-classes": "^7.8.3", + "@babel/plugin-transform-computed-properties": "^7.8.3", + "@babel/plugin-transform-destructuring": "^7.8.3", + "@babel/plugin-transform-dotall-regex": "^7.8.3", + "@babel/plugin-transform-duplicate-keys": "^7.8.3", + "@babel/plugin-transform-exponentiation-operator": "^7.8.3", + "@babel/plugin-transform-for-of": "^7.8.3", + "@babel/plugin-transform-function-name": "^7.8.3", + "@babel/plugin-transform-literals": "^7.8.3", + "@babel/plugin-transform-member-expression-literals": "^7.8.3", + "@babel/plugin-transform-modules-amd": "^7.8.3", + "@babel/plugin-transform-modules-commonjs": "^7.8.3", + "@babel/plugin-transform-modules-systemjs": "^7.8.3", + "@babel/plugin-transform-modules-umd": "^7.8.3", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", + "@babel/plugin-transform-new-target": "^7.8.3", + "@babel/plugin-transform-object-super": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.8.3", + "@babel/plugin-transform-property-literals": "^7.8.3", + "@babel/plugin-transform-regenerator": "^7.8.3", + "@babel/plugin-transform-reserved-words": "^7.8.3", + "@babel/plugin-transform-shorthand-properties": "^7.8.3", + "@babel/plugin-transform-spread": "^7.8.3", + "@babel/plugin-transform-sticky-regex": "^7.8.3", + "@babel/plugin-transform-template-literals": "^7.8.3", + "@babel/plugin-transform-typeof-symbol": "^7.8.3", + "@babel/plugin-transform-unicode-regex": "^7.8.3", + "@babel/types": "^7.8.3", + "browserslist": "^4.8.2", + "core-js-compat": "^3.6.2", "invariant": "^2.2.2", - "js-levenshtein": "^1.1.3", + "levenary": "^1.1.0", "semver": "^5.5.0" }, "dependencies": { @@ -2655,87 +2229,80 @@ } }, "@babel/runtime": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.3.tgz", - "integrity": "sha512-fVHx1rzEmwB130VTkLnxR+HmxcTjGzH12LYQcFFoBwakMd3aOMD4OsRN7tGG/UOYE2ektgFrS8uACAoRk1CY0w==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.2" - } - }, - "@babel/runtime-corejs3": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.8.3.tgz", - "integrity": "sha512-lrIU4aVbmlM/wQPzhEvzvNJskKyYptuXb0fGC0lTQTupTOYtR2Vqbu6/jf8vTr4M8Wt1nIzxVrSvPI5qESa/xA==", + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.7.tgz", + "integrity": "sha512-+AATMUFppJDw6aiR5NVPHqIQBlV/Pj8wY/EZH+lmvRdUo9xBaz/rF3alAwFJQavvKfeOlPE7oaaDHVbcySbCsg==", "dev": true, "requires": { - "core-js-pure": "^3.0.0", - "regenerator-runtime": "^0.13.2" + "regenerator-runtime": "^0.13.4" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", + "dev": true + } } }, "@babel/template": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", - "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", + "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.3", - "@babel/types": "^7.8.3" + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" } }, "@babel/traverse": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz", - "integrity": "sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.6.tgz", + "integrity": "sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A==", "dev": true, "requires": { "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.8.3", + "@babel/generator": "^7.8.6", "@babel/helper-function-name": "^7.8.3", "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.8.3", - "@babel/types": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "@babel/types": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", - "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.7.tgz", + "integrity": "sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw==", "dev": true, "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, "@cnakazawa/watch": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.3.tgz", - "integrity": "sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", + "integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==", "dev": true, "requires": { "exec-sh": "^0.3.2", - "minimist": "^1.2.0" + "minimist": "1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5" + } } }, "@compodoc/compodoc": { @@ -2767,7 +2334,7 @@ "loglevel-plugin-prefix": "^0.8.4", "lunr": "^2.3.6", "marked": "^0.7.0", - "minimist": "^1.2.0", + "minimist": "1.2.5", "opencollective-postinstall": "^2.0.2", "os-name": "^3.1.0", "pdfmake": "^0.1.60", @@ -2798,19 +2365,21 @@ } }, "json5": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", - "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.2.tgz", + "integrity": "sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ==", "dev": true, "requires": { - "minimist": "^1.2.0" + "minimist": "1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5" + } } }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true + "minimist": { + "version": "1.2.5" } } }, @@ -2877,6 +2446,81 @@ "is-negated-glob": "^1.0.0" } }, + "@istanbuljs/load-nyc-config": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz", + "integrity": "sha512-ZR0rq/f/E4f4XcgnDvtMWXCUJpi8eO0rssVhmztsZqLIEFA9UUP9zmpE0VxlM+kv/E1ul2I876Fwil2ayptDVg==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, "@istanbuljs/schema": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", @@ -2884,166 +2528,312 @@ "dev": true }, "@jest/console": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", - "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-25.1.0.tgz", + "integrity": "sha512-3P1DpqAMK/L07ag/Y9/Jup5iDEG9P4pRAuZiMQnU0JB3UOvCyYCjCoxr7sIA80SeyUCUKrr24fKAxVpmBgQonA==", "dev": true, "requires": { - "@jest/source-map": "^24.9.0", - "chalk": "^2.0.1", - "slash": "^2.0.0" + "@jest/source-map": "^25.1.0", + "chalk": "^3.0.0", + "jest-util": "^25.1.0", + "slash": "^3.0.0" }, "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, "@jest/core": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-24.9.0.tgz", - "integrity": "sha512-Fogg3s4wlAr1VX7q+rhV9RVnUv5tD7VuWfYy1+whMiWUrvl7U3QJSJyWcDio9Lq2prqYsZaeTv2Rz24pWGkJ2A==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-25.1.0.tgz", + "integrity": "sha512-iz05+NmwCmZRzMXvMo6KFipW7nzhbpEawrKrkkdJzgytavPse0biEnCNr2wRlyCsp3SmKaEY+SGv7YWYQnIdig==", "dev": true, "requires": { - "@jest/console": "^24.7.1", - "@jest/reporters": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.1", + "@jest/console": "^25.1.0", + "@jest/reporters": "^25.1.0", + "@jest/test-result": "^25.1.0", + "@jest/transform": "^25.1.0", + "@jest/types": "^25.1.0", + "ansi-escapes": "^4.2.1", + "chalk": "^3.0.0", "exit": "^0.1.2", - "graceful-fs": "^4.1.15", - "jest-changed-files": "^24.9.0", - "jest-config": "^24.9.0", - "jest-haste-map": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.9.0", - "jest-resolve-dependencies": "^24.9.0", - "jest-runner": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-snapshot": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", - "jest-watcher": "^24.9.0", - "micromatch": "^3.1.10", - "p-each-series": "^1.0.0", + "graceful-fs": "^4.2.3", + "jest-changed-files": "^25.1.0", + "jest-config": "^25.1.0", + "jest-haste-map": "^25.1.0", + "jest-message-util": "^25.1.0", + "jest-regex-util": "^25.1.0", + "jest-resolve": "^25.1.0", + "jest-resolve-dependencies": "^25.1.0", + "jest-runner": "^25.1.0", + "jest-runtime": "^25.1.0", + "jest-snapshot": "^25.1.0", + "jest-util": "^25.1.0", + "jest-validate": "^25.1.0", + "jest-watcher": "^25.1.0", + "micromatch": "^4.0.2", + "p-each-series": "^2.1.0", "realpath-native": "^1.1.0", - "rimraf": "^2.5.4", - "slash": "^2.0.0", - "strip-ansi": "^5.0.0" + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" }, "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" } } } }, "@jest/environment": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.9.0.tgz", - "integrity": "sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-25.1.0.tgz", + "integrity": "sha512-cTpUtsjU4cum53VqBDlcW0E4KbQF03Cn0jckGPW/5rrE9tb+porD3+hhLtHAwhthsqfyF+bizyodTlsRA++sHg==", "dev": true, "requires": { - "@jest/fake-timers": "^24.9.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "jest-mock": "^24.9.0" + "@jest/fake-timers": "^25.1.0", + "@jest/types": "^25.1.0", + "jest-mock": "^25.1.0" } }, "@jest/fake-timers": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.9.0.tgz", - "integrity": "sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-25.1.0.tgz", + "integrity": "sha512-Eu3dysBzSAO1lD7cylZd/CVKdZZ1/43SF35iYBNV1Lvvn2Undp3Grwsv8PrzvbLhqwRzDd4zxrY4gsiHc+wygQ==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-mock": "^24.9.0" + "@jest/types": "^25.1.0", + "jest-message-util": "^25.1.0", + "jest-mock": "^25.1.0", + "jest-util": "^25.1.0", + "lolex": "^5.0.0" } }, "@jest/reporters": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.9.0.tgz", - "integrity": "sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw==", - "dev": true, - "requires": { - "@jest/environment": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-25.1.0.tgz", + "integrity": "sha512-ORLT7hq2acJQa8N+NKfs68ZtHFnJPxsGqmofxW7v7urVhzJvpKZG9M7FAcgh9Ee1ZbCteMrirHA3m5JfBtAaDg==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^25.1.0", + "@jest/environment": "^25.1.0", + "@jest/test-result": "^25.1.0", + "@jest/transform": "^25.1.0", + "@jest/types": "^25.1.0", + "chalk": "^3.0.0", + "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.2", - "istanbul-lib-coverage": "^2.0.2", - "istanbul-lib-instrument": "^3.0.1", - "istanbul-lib-report": "^2.0.4", - "istanbul-lib-source-maps": "^3.0.1", - "istanbul-reports": "^2.2.6", - "jest-haste-map": "^24.9.0", - "jest-resolve": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-util": "^24.9.0", - "jest-worker": "^24.6.0", - "node-notifier": "^5.4.2", - "slash": "^2.0.0", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.0", + "jest-haste-map": "^25.1.0", + "jest-resolve": "^25.1.0", + "jest-runtime": "^25.1.0", + "jest-util": "^25.1.0", + "jest-worker": "^25.1.0", + "node-notifier": "^6.0.0", + "slash": "^3.0.0", "source-map": "^0.6.0", - "string-length": "^2.0.0" + "string-length": "^3.1.0", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^4.0.1" }, "dependencies": { - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "istanbul-lib-instrument": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", - "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "jest-worker": { + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-25.1.0.tgz", + "integrity": "sha512-ZHhHtlxOWSxCoNOKHGbiLzXnl42ga9CxDr27H36Qn+15pQZd3R/F24jrmjDelw9j/iHUIWMWs08/u2QN50HHOg==", "dev": true, "requires": { - "@babel/generator": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", - "istanbul-lib-coverage": "^2.0.5", - "semver": "^6.0.0" + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" } }, "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, "source-map": { @@ -3051,17 +2841,26 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, "@jest/source-map": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", - "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-25.1.0.tgz", + "integrity": "sha512-ohf2iKT0xnLWcIUhL6U6QN+CwFWf9XnrM2a6ybL9NXxJjgYijjLSitkYHIdzkd8wFliH73qj/+epIpTiWjRtAA==", "dev": true, "requires": { "callsites": "^3.0.0", - "graceful-fs": "^4.1.15", + "graceful-fs": "^4.2.3", "source-map": "^0.6.0" }, "dependencies": { @@ -3080,56 +2879,103 @@ } }, "@jest/test-result": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", - "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-25.1.0.tgz", + "integrity": "sha512-FZzSo36h++U93vNWZ0KgvlNuZ9pnDnztvaM7P/UcTx87aPDotG18bXifkf1Ji44B7k/eIatmMzkBapnAzjkJkg==", "dev": true, "requires": { - "@jest/console": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/istanbul-lib-coverage": "^2.0.0" + "@jest/console": "^25.1.0", + "@jest/transform": "^25.1.0", + "@jest/types": "^25.1.0", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz", - "integrity": "sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-25.1.0.tgz", + "integrity": "sha512-WgZLRgVr2b4l/7ED1J1RJQBOharxS11EFhmwDqknpknE0Pm87HLZVS2Asuuw+HQdfQvm2aXL2FvvBLxOD1D0iw==", "dev": true, "requires": { - "@jest/test-result": "^24.9.0", - "jest-haste-map": "^24.9.0", - "jest-runner": "^24.9.0", - "jest-runtime": "^24.9.0" + "@jest/test-result": "^25.1.0", + "jest-haste-map": "^25.1.0", + "jest-runner": "^25.1.0", + "jest-runtime": "^25.1.0" } }, "@jest/transform": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.9.0.tgz", - "integrity": "sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-25.1.0.tgz", + "integrity": "sha512-4ktrQ2TPREVeM+KxB4zskAT84SnmG1vaz4S+51aTefyqn3zocZUnliLLm5Fsl85I3p/kFPN4CRp1RElIfXGegQ==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/types": "^24.9.0", - "babel-plugin-istanbul": "^5.1.0", - "chalk": "^2.0.1", + "@jest/types": "^25.1.0", + "babel-plugin-istanbul": "^6.0.0", + "chalk": "^3.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.1.15", - "jest-haste-map": "^24.9.0", - "jest-regex-util": "^24.9.0", - "jest-util": "^24.9.0", - "micromatch": "^3.1.10", + "graceful-fs": "^4.2.3", + "jest-haste-map": "^25.1.0", + "jest-regex-util": "^25.1.0", + "jest-util": "^25.1.0", + "micromatch": "^4.0.2", "pirates": "^4.0.1", "realpath-native": "^1.1.0", - "slash": "^2.0.0", + "slash": "^3.0.0", "source-map": "^0.6.1", - "write-file-atomic": "2.4.1" + "write-file-atomic": "^3.0.0" }, "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, "source-map": { @@ -3137,18 +2983,74 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-25.1.0.tgz", + "integrity": "sha512-VpOtt7tCrgvamWZh1reVsGADujKigBUFTi19mlRjqEGsE8qH4r3s+skY33dNdXOwyZIvuftZ5tqdF1IgsMejMA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" + "@types/yargs": "^15.0.0", + "chalk": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "@mrmlnc/readdir-enhanced": { @@ -3162,12 +3064,12 @@ } }, "@ngtools/webpack": { - "version": "8.3.23", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-8.3.23.tgz", - "integrity": "sha512-+XekeThky6+Upped3hOwjHwYTsXJiDuCA5ZZLmGHkTxGzjB4ZHSlBaj75yTS+s+/Ab1WgdRo2P2BxOUS7oogtw==", + "version": "8.3.25", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-8.3.25.tgz", + "integrity": "sha512-yHvgxXUXlgdWijtzcRjTaUqzK+6TVK/8p7PreBR00GsLxhl4U1jQSC6yDaZUCjOaEkiczFWl4hEuC4wTU/hLdg==", "dev": true, "requires": { - "@angular-devkit/core": "8.3.23", + "@angular-devkit/core": "8.3.25", "enhanced-resolve": "4.1.0", "rxjs": "6.4.0", "tree-kill": "1.2.2", @@ -3202,23 +3104,23 @@ "dev": true }, "@schematics/angular": { - "version": "8.3.23", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-8.3.23.tgz", - "integrity": "sha512-yisP1iCLGC4VnZNC3kOnYyTS5cmfKEnLM9bMzhZGMWwov9RRfdxKKeSnG9FJNwHxI0WjQ0UWwfiz1dj0YacG3g==", + "version": "8.3.25", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-8.3.25.tgz", + "integrity": "sha512-/vEPtE+fvgsWPml/MVqzmlGPBujadPPNwaTuuj5Uz1aVcKeEYzLkbN8YQOpml4vxZHCF8RDwNdGiU4SZg63Jfg==", "dev": true, "requires": { - "@angular-devkit/core": "8.3.23", - "@angular-devkit/schematics": "8.3.23" + "@angular-devkit/core": "8.3.25", + "@angular-devkit/schematics": "8.3.25" } }, "@schematics/update": { - "version": "0.803.23", - "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.803.23.tgz", - "integrity": "sha512-pLd5PseFTYF3VZ+IgMeNEFATQY5A80ylot7Dcg9FDeihqr5R9Rd1maCWIR43oKXvtK5C5+ackwR0QaPBAZ9bdw==", + "version": "0.803.25", + "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.803.25.tgz", + "integrity": "sha512-VIlqhJsCStA3aO4llxZ7lAOvQUqppyZdrEO7f/ApIJmuofPQTkO5Hx21tnv0dyExwoqPCSIHzEu4Tmc0/TWM1A==", "dev": true, "requires": { - "@angular-devkit/core": "8.3.23", - "@angular-devkit/schematics": "8.3.23", + "@angular-devkit/core": "8.3.25", + "@angular-devkit/schematics": "8.3.25", "@yarnpkg/lockfile": "1.1.0", "ini": "1.3.5", "pacote": "9.5.5", @@ -3238,15 +3140,24 @@ } } }, + "@sinonjs/commons": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.7.1.tgz", + "integrity": "sha512-Debi3Baff1Qu1Unc3mjJ96MgpbwTn43S1+9yJ0llWygPwDNu2aaWBD6yc9y/Z8XDRNhx7U+u2UDg2OGQXkclUQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, "@swimlane/ngx-datatable": { "version": "15.0.2", "resolved": "https://registry.npmjs.org/@swimlane/ngx-datatable/-/ngx-datatable-15.0.2.tgz", "integrity": "sha512-IlUyCs/hLv12hzz2pGugbrdRpBbwE6JUM4Bm4CCqLptmZj+t8pw8Ywthde8yUDdpgGgTJeJ9G5o92QadyGbP3g==" }, "@types/babel__core": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.3.tgz", - "integrity": "sha512-8fBo0UR2CcwWxeX7WIIgJ7lXjasFxoYgRnFHUj+hRvKkpiBJbxhdAPTCY6/ZKM0uxANFVzt4yObSLuTiTnazDA==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.6.tgz", + "integrity": "sha512-tTnhWszAqvXnhW7m5jQU9PomXSiKXk2sFxpahXvI20SZKu9ylPi8WtIxueZ6ehDWikPT0jeFujMj3X4ZHuf3Tg==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -3276,18 +3187,27 @@ } }, "@types/babel__traverse": { - "version": "7.0.8", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.8.tgz", - "integrity": "sha512-yGeB2dHEdvxjP0y4UbRtQaSkXJ9649fYCmIdRoul5kfAoGCwxuCbMhag0k3RPfnuh9kPGm8x89btcfDEXdVWGw==", + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.9.tgz", + "integrity": "sha512-jEFQ8L1tuvPjOI8lnpaf73oCJe+aoxL6ygqSy6c8LcW98zaC+4mzWuQIRCEvKeCOu+lbqdXcg4Uqmm1S8AP1tw==", "dev": true, "requires": { "@babel/types": "^7.3.0" } }, "@types/chart.js": { - "version": "2.9.10", - "resolved": "https://registry.npmjs.org/@types/chart.js/-/chart.js-2.9.10.tgz", - "integrity": "sha512-JM3EblRdGWF9/0NxIgOU7eCG17MlaaPzBKP+/XUlRedChhJzco+PFB0gqBpRY6dXzS2J13B76iIG54dpe9gKMg==" + "version": "2.9.16", + "resolved": "https://registry.npmjs.org/@types/chart.js/-/chart.js-2.9.16.tgz", + "integrity": "sha512-Mofg7xFIeAWME46YMVKHPCyUz2Z0KsVMNE1f4oF3T74mK3RiPQxOm9qzoeNTyMs6lpl4x0tiHL+Wsz2DHCxQlQ==", + "requires": { + "moment": "^2.10.2" + } + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true }, "@types/events": { "version": "3.0.0", @@ -3313,9 +3233,9 @@ "dev": true }, "@types/istanbul-lib-report": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz", - "integrity": "sha512-3BUTyMzbZa2DtDI2BkERNC6jJw2Mr2Y0oGI7mRxYNBPxppbtEK1F66u3bKwU2g+wxwWI7PAoRpJnOY1grJqzHg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "*" @@ -3332,27 +3252,28 @@ } }, "@types/jasmine": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-3.4.0.tgz", - "integrity": "sha512-6pUnBg6DuSB55xnxJ5+gW9JOkFrPsXkYAuqqEE8oyrpgDiPQ+TZ+1Zt4S+CHcRJcxyNYXeIXG4vHSzdF6y9Uvw==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-3.5.9.tgz", + "integrity": "sha512-KNL2Fq6GRmty2j6+ZmueT/Z/dkctLNH+5DFoGHNDtcgt7yME9NZd8x2p81Yuea1Xux/qAryDd3zVLUoKpDz1TA==", "dev": true }, "@types/jasminewd2": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.6.tgz", - "integrity": "sha512-2ZOKrxb8bKRmP/po5ObYnRDgFE4i+lQiEB27bAMmtMWLgJSqlIDqlLx6S0IRorpOmOPRQ6O80NujTmQAtBkeNw==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.8.tgz", + "integrity": "sha512-d9p31r7Nxk0ZH0U39PTH0hiDlJ+qNVGjlt1ucOoTUptxb2v+Y5VMnsxfwN+i3hK4yQnqBi3FMmoMFcd1JHDxdg==", "dev": true, "requires": { "@types/jasmine": "*" } }, "@types/jest": { - "version": "24.0.23", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-24.0.23.tgz", - "integrity": "sha512-L7MBvwfNpe7yVPTXLn32df/EK+AMBFAFvZrRuArGs7npEWnlziUXK+5GMIUTI4NIuwok3XibsjXCs5HxviYXjg==", + "version": "25.1.4", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-25.1.4.tgz", + "integrity": "sha512-QDDY2uNAhCV7TMCITrxz+MRk1EizcsevzfeS6LykIlq2V1E5oO4wXG8V2ZEd9w7Snxeeagk46YbMgZ8ESHx3sw==", "dev": true, "requires": { - "jest-diff": "^24.3.0" + "jest-diff": "^25.1.0", + "pretty-format": "^25.1.0" } }, "@types/lodash": { @@ -3380,9 +3301,9 @@ "dev": true }, "@types/selenium-webdriver": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.16.tgz", - "integrity": "sha512-lMC2G0ItF2xv4UCiwbJGbnJlIuUixHrioOhNGHSCsYCJ8l4t9hMCUimCytvFv7qy6AfSzRxhRHoGa+UqaqwyeA==", + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/@types/selenium-webdriver/-/selenium-webdriver-3.0.17.tgz", + "integrity": "sha512-tGomyEuzSC1H28y2zlW6XPCaDaXFaD6soTdb4GNdmte2qfHtrKqhy0ZFs4r/1hpazCfEZqeTSRLvSasmEx89uw==", "dev": true }, "@types/simplebar": { @@ -3423,9 +3344,9 @@ } }, "@types/yargs": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.5.tgz", - "integrity": "sha512-CF/+sxTO7FOwbIRL4wMv0ZYLCRfMid2HQpzDRyViH7kSpfoAFiMdGqKIxb1PxWfjtQXQhnQuD33lvRHNwr809Q==", + "version": "15.0.4", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.4.tgz", + "integrity": "sha512-9T1auFmbPZoxHz0enUFlUuKRy3it01R+hlggyVUMtnCTQRunsQYifnSGb8hET4Xo8yiC0o0r1paW3ud5+rbURg==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -3658,9 +3579,9 @@ } }, "acorn": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", - "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", "dev": true }, "acorn-globals": { @@ -3693,23 +3614,23 @@ }, "dependencies": { "acorn": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", - "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", "dev": true } } }, "acorn-walk": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.0.0.tgz", - "integrity": "sha512-7Bv1We7ZGuU79zZbb6rRqcpxo3OY+zrdtloZWoyD8fmGX+FeXRjE+iuGkZjSXLVovLzrsvMGMy0EkwA0E0umxg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.1.1.tgz", + "integrity": "sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ==", "dev": true }, "adm-zip": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.13.tgz", - "integrity": "sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw==", + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.14.tgz", + "integrity": "sha512-/9aQCnQHF+0IiCl0qhXoK7qs//SwYE7zX8lsr/DNk1BRAHYxeLZPL4pguwK29gUEqasYQjqPtEpDRSWEkdHn9g==", "dev": true }, "agent-base": { @@ -3776,12 +3697,12 @@ "dev": true }, "ansi-escapes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz", - "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.11.0" } }, "ansi-gray": { @@ -3830,18 +3751,18 @@ } }, "apache-crypt": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/apache-crypt/-/apache-crypt-1.2.1.tgz", - "integrity": "sha1-1vxyqm0n2ZyVqU/RiNcx7v/6Zjw=", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/apache-crypt/-/apache-crypt-1.2.4.tgz", + "integrity": "sha512-Icze5ny5W5uv3xgMgl8U+iGmRCC0iIDrb2PVPuRBtL3Zy1Y5TMewXP1Vtc4r5X9eNNBEk7KYPu0Qby9m/PmcHg==", "dev": true, "requires": { - "unix-crypt-td-js": "^1.0.0" + "unix-crypt-td-js": "^1.1.4" } }, "apache-md5": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/apache-md5/-/apache-md5-1.1.2.tgz", - "integrity": "sha1-7klza2ObTxCLbp5ibG2pkwa0FpI=", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/apache-md5/-/apache-md5-1.1.5.tgz", + "integrity": "sha512-sbLEIMQrkV7RkIruqTPXxeCMkAAycv4yzTkBzRgOR1BrR5UB7qZtupqxkersTJSf0HZ3sbaNRrNV80TnnM7cUw==", "dev": true }, "app-root-path": { @@ -3857,9 +3778,9 @@ "dev": true }, "arg": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.2.tgz", - "integrity": "sha512-+ytCkGcBtHZ3V2r2Z06AncYO8jz46UEamcspGoU8lHcEbpn6J77QK0vdWvChsclg/tM5XIJC5tnjmPp7Eq6Obg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, "argparse": { @@ -4105,14 +4026,6 @@ "dev": true, "requires": { "lodash": "^4.17.14" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "async-each": { @@ -4172,142 +4085,118 @@ "dev": true }, "axobject-query": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.1.1.tgz", - "integrity": "sha512-lF98xa/yvy6j3fBHAgQXIYl+J4eZadOSqsPojemUqClzNbBV38wWGpUbQbVEyf4eUF5yF7eHmGgGA2JiHyjeqw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.7.4", - "@babel/runtime-corejs3": "^7.7.4" - } + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.1.2.tgz", + "integrity": "sha512-ICt34ZmrVt8UQnvPl6TVyDTkmhXmAyAT4Jh5ugfGUX4MOrZ+U/ZY6/sdylRw3qGNr9Ub5AJsaHeDMzNLehRdOQ==", + "dev": true }, "babel-jest": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.9.0.tgz", - "integrity": "sha512-ntuddfyiN+EhMw58PTNL1ph4C9rECiQXjI4nMMBKBaNjXvqLdkXpPRcMSr4iyBrJg/+wz9brFUD6RhOAT6r4Iw==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-25.1.0.tgz", + "integrity": "sha512-tz0VxUhhOE2y+g8R2oFrO/2VtVjA1lkJeavlhExuRBg3LdNJY9gwQ+Vcvqt9+cqy71MCTJhewvTB7Qtnnr9SWg==", "dev": true, "requires": { - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", + "@jest/transform": "^25.1.0", + "@jest/types": "^25.1.0", "@types/babel__core": "^7.1.0", - "babel-plugin-istanbul": "^5.1.0", - "babel-preset-jest": "^24.9.0", - "chalk": "^2.4.2", - "slash": "^2.0.0" - }, - "dependencies": { - "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true - } - } - }, - "babel-plugin-dynamic-import-node": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz", - "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==", - "dev": true, - "requires": { - "object.assign": "^4.1.0" - } - }, - "babel-plugin-istanbul": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz", - "integrity": "sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "find-up": "^3.0.0", - "istanbul-lib-instrument": "^3.3.0", - "test-exclude": "^5.2.3" + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^25.1.0", + "chalk": "^3.0.0", + "slash": "^3.0.0" }, "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", - "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", "dev": true, "requires": { - "@babel/generator": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", - "istanbul-lib-coverage": "^2.0.5", - "semver": "^6.0.0" + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" } }, - "locate-path": { + "chalk": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "p-try": "^2.0.0" + "color-name": "~1.1.4" } }, - "p-locate": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "slash": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "has-flag": "^4.0.0" } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true } } }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz", + "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-plugin-istanbul": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", + "integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^4.0.0", + "test-exclude": "^6.0.0" + } + }, "babel-plugin-jest-hoist": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.9.0.tgz", - "integrity": "sha512-2EMA2P8Vp7lG0RAzr4HXqtYwacfMErOuv1U3wrvxHX6rD1sV6xS3WXG3r8TRQ2r6w8OhvSdWt+z41hQNwNm3Xw==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-25.1.0.tgz", + "integrity": "sha512-oIsopO41vW4YFZ9yNYoLQATnnN46lp+MZ6H4VvPKFkcc2/fkl3CfE/NZZSmnEIEsJRmJAgkVEK0R7Zbl50CpTw==", "dev": true, "requires": { "@types/babel__traverse": "^7.0.6" } }, "babel-preset-jest": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz", - "integrity": "sha512-izTUuhE4TMfTRPF92fFwD2QfdXaZW08qvWTFCI51V8rW5x00UuPgc3ajRoWofXOuxjfcOM5zzSYsQS3H8KGCAg==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-25.1.0.tgz", + "integrity": "sha512-eCGn64olaqwUMaugXsTtGAM2I0QTahjEtnRu0ql8Ie+gDWAc1N6wqN0k2NilnyTunM69Pad7gJY7LOtwLimoFQ==", "dev": true, "requires": { + "@babel/plugin-syntax-bigint": "^7.0.0", "@babel/plugin-syntax-object-rest-spread": "^7.0.0", - "babel-plugin-jest-hoist": "^24.9.0" + "babel-plugin-jest-hoist": "^25.1.0" } }, "babel-runtime": { @@ -4442,23 +4331,18 @@ "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", "dev": true }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "optional": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, "blocking-proxy": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/blocking-proxy/-/blocking-proxy-1.0.1.tgz", "integrity": "sha512-KE8NFMZr3mN2E0HcvCgRtX7DjhiIQrwle+nSVJVC/yqFb9+xznHl2ZcoBp2L9qzkI4t4cBFJ1efXF8Dwi132RA==", "dev": true, "requires": { - "minimist": "^1.2.0" + "minimist": "1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5" + } } }, "bluebird": { @@ -4591,9 +4475,9 @@ } }, "browser-process-hrtime": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz", - "integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", "dev": true }, "browser-resolve": { @@ -4696,14 +4580,14 @@ } }, "browserslist": { - "version": "4.8.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.3.tgz", - "integrity": "sha512-iU43cMMknxG1ClEZ2MDKeonKE1CCrFVkQK2AqO2YWFmvIrx4JWrvQ4w4hQez6EpVI8rHTtqh/ruHHDHSOKxvUg==", + "version": "4.8.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.6.tgz", + "integrity": "sha512-ZHao85gf0eZ0ESxLfCp73GG9O/VTytYDIkIiZDlURppLTI9wErSM/5yAKEq6rcUdxBLjMELmrYUJGg5sxGKMHg==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001017", - "electron-to-chromium": "^1.3.322", - "node-releases": "^1.1.44" + "caniuse-lite": "^1.0.30001023", + "electron-to-chromium": "^1.3.341", + "node-releases": "^1.1.47" } }, "browserstack": { @@ -4925,9 +4809,9 @@ "integrity": "sha1-IsxKNKCrxDlQ9CxkEQJKP2NmtFo=" }, "caniuse-lite": { - "version": "1.0.30001020", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001020.tgz", - "integrity": "sha512-yWIvwA68wRHKanAVS1GjN8vajAv7MBFshullKCeq/eKpK7pJBVDgFFEqvgWTkcP2+wIDeQGYFRXECjKZnLkUjA==", + "version": "1.0.30001024", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001024.tgz", + "integrity": "sha512-LubRSEPpOlKlhZw9wGlLHo8ZVj6ugGU3xGUfLPneNBledSd9lIM5cCGZ9Mz/mMCJUhEt4jZpYteZNVRdJw5FRA==", "dev": true }, "canonical-path": { @@ -5008,12 +4892,6 @@ "parse5": "^3.0.1" }, "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, "parse5": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", @@ -5033,7 +4911,7 @@ "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.2", + "fsevents": "2.1.2", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -5042,11 +4920,7 @@ }, "dependencies": { "fsevents": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", - "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", - "dev": true, - "optional": true + "version": "2.1.2" }, "glob-parent": { "version": "5.1.0", @@ -5060,9 +4934,9 @@ } }, "chownr": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz", - "integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", "dev": true }, "chrome-trace-event": { @@ -5253,6 +5127,12 @@ } } }, + "collect-v8-coverage": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.0.tgz", + "integrity": "sha512-VKIhJgvk8E1W28m5avZ2Gv2Ruv5YiF56ug2oclvaG9md69BuZImMG2sk9g7QNKLUbtYAKQjXjYxbYZVUlMMKmQ==", + "dev": true + }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -5612,12 +5492,6 @@ } } }, - "core-js-pure": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.4.tgz", - "integrity": "sha512-epIhRLkXdgv32xIUFaaAry2wdxZYBi6bgM7cB136dzzXXa+dFyRLTZeLUJxnd8ShrmyVXBub63n2NHo2JAt8Cw==", - "dev": true - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -5659,13 +5533,31 @@ "schema-utils": "^2.6.1" }, "dependencies": { + "ajv": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", + "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true + }, "schema-utils": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.4.tgz", - "integrity": "sha512-VNjcaUxVnEeun6B2fiiUDjXXBtD4ZSH7pdbfIu1pOFwgptDPLMo/z9jr4sUfsjFVPqDCEin/F7IYlq7/E6yDbQ==", + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.5.tgz", + "integrity": "sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ==", "dev": true, "requires": { - "ajv": "^6.10.2", + "ajv": "^6.12.0", "ajv-keywords": "^3.4.1" } } @@ -5738,9 +5630,9 @@ } }, "crypto-js": { - "version": "3.1.9-1", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", - "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.3.0.tgz", + "integrity": "sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q==", "dev": true }, "css-parse": { @@ -5762,48 +5654,14 @@ } }, "css-selector-tokenizer": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz", - "integrity": "sha512-xYL0AMZJ4gFzJQsHUKa5jiWWi2vH77WVNg7JYRyewwj6oPh4yb/y6Y9ZCw9dsj/9UauMhtuxR+ogQd//EdEVNA==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.2.tgz", + "integrity": "sha512-yj856NGuAymN6r8bn8/Jl46pR+OC3eEvAhfGYDUe7YPtTPAYrSSw4oAniZ9Y8T5B92hjhwTBLUen0/vKPxf6pw==", "dev": true, "requires": { - "cssesc": "^0.1.0", - "fastparse": "^1.1.1", - "regexpu-core": "^1.0.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - }, - "regexpu-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", - "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", - "dev": true, - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", - "dev": true - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - } - } + "cssesc": "^3.0.0", + "fastparse": "^1.1.2", + "regexpu-core": "^4.6.0" } }, "css-what": { @@ -5822,9 +5680,9 @@ } }, "cssesc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz", - "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true }, "cssfontparser": { @@ -5834,18 +5692,26 @@ "dev": true }, "cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", "dev": true }, "cssstyle": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz", - "integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.2.0.tgz", + "integrity": "sha512-sEb3XFPx3jNnCAMtqrXPDeSgQr+jojtCeNf8cvMNMh1cG970+lljssvQDzPq6lmmJu2Vhqood/gtEomBiHOGnA==", "dev": true, "requires": { - "cssom": "0.3.x" + "cssom": "~0.3.6" + }, + "dependencies": { + "cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true + } } }, "cyclist": { @@ -5865,9 +5731,15 @@ } }, "damerau-levenshtein": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.5.tgz", - "integrity": "sha512-CBCRqFnpu715iPmw1KrdOrzRqbdFwQTwAWyyyYS42+iAgHCuXZ+/TdMgQkUENPomxEz9z1BEzuQU2Xw0kUuAgA==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz", + "integrity": "sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug==", + "dev": true + }, + "dash-ast": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", + "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", "dev": true }, "dashdash": { @@ -5888,19 +5760,6 @@ "abab": "^2.0.0", "whatwg-mimetype": "^2.2.0", "whatwg-url": "^7.0.0" - }, - "dependencies": { - "whatwg-url": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", - "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", - "dev": true, - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - } } }, "debug": { @@ -6147,9 +6006,9 @@ "dev": true }, "detect-newline": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", - "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true }, "detect-node": { @@ -6181,9 +6040,9 @@ "dev": true }, "diff-sequences": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz", - "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-25.1.0.tgz", + "integrity": "sha512-nFIfVk5B/NStCsJ+zaPO4vYuLjlzQ6uFvPxzYyHlejNZ/UGa7G/n7peOXVrVNvRuyfstt+mZQYGpjxg9Z6N8Kw==", "dev": true }, "diffie-hellman": { @@ -6331,9 +6190,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.338", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.338.tgz", - "integrity": "sha512-wlmfixuHEc9CkfOKgcqdtzBmRW4NStM9ptl5oPILY2UDyHuSXb3Yit+yLVyLObTgGuMMU36hhnfs2GDJId7ctA==", + "version": "1.3.378", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.378.tgz", + "integrity": "sha512-nBp/AfhaVIOnfwgL1CZxt80IcqWcyYXiX6v5gflAksxy+SzBVz7A7UWR1Nos92c9ofXW74V9PoapzRb0jJfYXw==", "dev": true }, "elliptic": { @@ -6429,9 +6288,9 @@ } }, "es-abstract": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.3.tgz", - "integrity": "sha512-AwiVPKf3sKGMoWtFw0J7Y4MTZ4Iek67k4COWOwHqS8B9TOZ71DCfcoBmdamy8Y6mj4MDz0+VNUpC2HKHFHA3pg==", + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", + "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", @@ -6775,17 +6634,38 @@ } }, "expect": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-24.9.0.tgz", - "integrity": "sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-25.1.0.tgz", + "integrity": "sha512-wqHzuoapQkhc3OKPlrpetsfueuEiMf3iWh0R8+duCu9PIjXoP7HgD5aeypwTnXUAjC8aMsiVDaWwlbJ1RlQ38g==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "ansi-styles": "^3.2.0", - "jest-get-type": "^24.9.0", - "jest-matcher-utils": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-regex-util": "^24.9.0" + "@jest/types": "^25.1.0", + "ansi-styles": "^4.0.0", + "jest-get-type": "^25.1.0", + "jest-matcher-utils": "^25.1.0", + "jest-message-util": "^25.1.0", + "jest-regex-util": "^25.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + } } }, "express": { @@ -6982,27 +6862,27 @@ "dev": true }, "falafel": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.1.0.tgz", - "integrity": "sha1-lrsXdh2rqU9G0AFzizzt86Z/4Gw=", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.2.4.tgz", + "integrity": "sha512-0HXjo8XASWRmsS0X1EkhwEMZaD3Qvp7FfURwjLKjG1ghfRm/MGZl2r4cWUTv41KdNghTw4OUMmVtdGQp3+H+uQ==", "dev": true, "requires": { - "acorn": "^5.0.0", + "acorn": "^7.1.1", "foreach": "^2.0.5", - "isarray": "0.0.1", + "isarray": "^2.0.1", "object-keys": "^1.0.6" }, "dependencies": { "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", "dev": true }, "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "dev": true } } @@ -7082,9 +6962,9 @@ "dev": true }, "figures": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.1.0.tgz", - "integrity": "sha512-ravh8VRXqHuMvZt/d8GblBeqDMkdJMBdv/2KntFH+ra5MXkO7nxNKpzQ3n6QD/2da1kH0aWmNISdvhM7gl2gVg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" @@ -7100,25 +6980,36 @@ "schema-utils": "^2.0.0" }, "dependencies": { + "ajv": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", + "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true + }, "schema-utils": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.4.tgz", - "integrity": "sha512-VNjcaUxVnEeun6B2fiiUDjXXBtD4ZSH7pdbfIu1pOFwgptDPLMo/z9jr4sUfsjFVPqDCEin/F7IYlq7/E6yDbQ==", + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.5.tgz", + "integrity": "sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ==", "dev": true, "requires": { - "ajv": "^6.10.2", + "ajv": "^6.12.0", "ajv-keywords": "^3.4.1" } } } }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true, - "optional": true - }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -7191,9 +7082,9 @@ } }, "make-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", - "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", + "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", "dev": true, "requires": { "semver": "^6.0.0" @@ -7307,9 +7198,9 @@ } }, "follow-redirects": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz", - "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.10.0.tgz", + "integrity": "sha512-4eyLK6s6lH32nOvLLwlIOnr9zrL8Sm+OvW4pVTJNoXeGzYIkHVf+pADQi+OJ0E67hiuSLezPVPyBcIZO50TmmQ==", "dev": true, "requires": { "debug": "^3.0.0" @@ -7551,562 +7442,9 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", - "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", "dev": true, "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1", - "node-pre-gyp": "*" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "3.2.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.9.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.14.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.1", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.13", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.1.1", - "bundled": true, - "dev": true, - "optional": true - } - } + "version": "2.1.2" }, "function-bind": { "version": "1.1.1", @@ -8120,6 +7458,12 @@ "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==", "dev": true }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "dev": true + }, "get-assigned-identifiers": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", @@ -8253,7 +7597,8 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", - "dev": true + "dev": true, + "optional": true }, "handle-thing": { "version": "2.0.0", @@ -8262,9 +7607,9 @@ "dev": true }, "handlebars": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.2.tgz", - "integrity": "sha512-4PwqDL2laXtTWZghzzCtunQUTLbo31pcCJrd/B/9JP8XbhVzpS5ZXuKqlOzsd1rtcaLo4KqAn8nl8mkknS4MHw==", + "version": "4.7.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.3.tgz", + "integrity": "sha512-SRGwSYuNfx8DwHD/6InAPzD6RgeruWLT+B8e8a7gGs8FWgHzlExpTFMEq2IA6QpAfOClpKHy6+8IqTjeBCu6Kg==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -8420,9 +7765,9 @@ } }, "hosted-git-info": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", - "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "dev": true }, "hpack.js": { @@ -8481,16 +7826,10 @@ "promise": "^8.0.2" }, "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, "promise": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/promise/-/promise-8.0.3.tgz", - "integrity": "sha512-HeRDUL1RJiLhyA0/grn+PTShlBAcLuh/1BJGtrvjwbvRDCTLLMEz9rOGCV+R3vHY4MixIuoMEd9Yq/XvsTPcjw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", + "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", "dev": true, "requires": { "asap": "~2.0.6" @@ -8584,19 +7923,19 @@ } }, "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "dev": true, "requires": { "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", "p-is-promise": "^2.0.0" - } + }, + "version": "4.3.0" }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true }, "os-locale": { "version": "3.1.0", @@ -8606,19 +7945,11 @@ "requires": { "execa": "^1.0.0", "lcid": "^2.0.0", - "mem": "^4.0.0" + "mem": "4.3.0" }, "dependencies": { "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } + "version": "4.3.0" } } }, @@ -8683,9 +8014,9 @@ }, "dependencies": { "readable-stream": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.5.0.tgz", - "integrity": "sha512-gSz026xs2LfxBPudDuI41V1lka8cxg64E66SGe78zJlsUofOg/yqwezdIcdfwik6B4h8LFmWPA9ef9X3FiNFLA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -8794,14 +8125,6 @@ "is-glob": "^4.0.0", "lodash": "^4.17.11", "micromatch": "^3.1.10" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "http-signature": { @@ -8842,6 +8165,12 @@ } } }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, "humanize-ms": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", @@ -9012,12 +8341,6 @@ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, "string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", @@ -9102,9 +8425,9 @@ "dev": true }, "ipaddr.js": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", - "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "dev": true }, "is-absolute": { @@ -9417,9 +8740,9 @@ "dev": true }, "istanbul-lib-instrument": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.0.tgz", - "integrity": "sha512-Nm4wVHdo7ZXSG30KjZ2Wl5SU/Bw7bDx1PdaiIFzEStdjs0H12mOTncn1GVYuqQSaZxpg87VGBRsVRPGD2cD1AQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.1.tgz", + "integrity": "sha512-imIchxnodll7pvQBYOqUu88EufLCU56LMeFPZZM/fJZ1irYcYdqroaV+ACK1Ila8ls09iEYArp+nqyC6lW1Vfg==", "dev": true, "requires": { "@babel/core": "^7.7.5", @@ -9432,52 +8755,53 @@ } }, "istanbul-lib-report": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", - "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", "dev": true, "requires": { - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "supports-color": "^6.1.0" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" }, "dependencies": { - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "make-dir": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.2.tgz", + "integrity": "sha512-rYKABKutXa6vXTXhoV18cBE7PaewPXHe/Bdq4v+ZLMhxbWApkFFplT0LcbMW+6BbjnQXzZ/sAvSE/JdguApG5w==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } } } }, "istanbul-lib-source-maps": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", - "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", "dev": true, "requires": { "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.5", - "make-dir": "^2.1.0", - "rimraf": "^2.6.3", + "istanbul-lib-coverage": "^3.0.0", "source-map": "^0.6.1" }, "dependencies": { - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -9487,12 +8811,13 @@ } }, "istanbul-reports": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz", - "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.0.tgz", + "integrity": "sha512-2osTcC8zcOSUkImzN2EWQta3Vdi4WjjKw99P2yWx5mLnigAM0Rd5uYFn1cf2i/Ois45GkNjaoTqc5CxgMSX80A==", "dev": true, "requires": { - "html-escaper": "^2.0.0" + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" } }, "jasmine": { @@ -9521,20 +8846,12 @@ "dev": true }, "jasmine-fail-fast": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jasmine-fail-fast/-/jasmine-fail-fast-2.0.0.tgz", - "integrity": "sha1-5dguaimiX2YsZA5MMnDC+acTh+c=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jasmine-fail-fast/-/jasmine-fail-fast-2.0.1.tgz", + "integrity": "sha512-En8ONwvDQOV+jyiZEZvbvUSLWSdJFj9HiWjhLdGq/V/gxs4XyST730ooe928BbRxv4bfy05OpykKuoOU4aLC5w==", "dev": true, "requires": { - "lodash": "3.10.0" - }, - "dependencies": { - "lodash": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.0.tgz", - "integrity": "sha1-k9UcZygopEFqEq9XIguoqHN+L7s=", - "dev": true - } + "lodash": "^4.17.15" } }, "jasmine-spec-reporter": { @@ -9561,51 +8878,76 @@ "dev": true }, "jest": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-24.9.0.tgz", - "integrity": "sha512-YvkBL1Zm7d2B1+h5fHEOdyjCG+sGMz4f8D86/0HiqJ6MB4MnDc8FgP5vdWsGnemOQro7lnYo8UakZ3+5A0jxGw==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-25.1.0.tgz", + "integrity": "sha512-FV6jEruneBhokkt9MQk0WUFoNTwnF76CLXtwNMfsc0um0TlB/LG2yxUd0KqaFjEJ9laQmVWQWS0sG/t2GsuI0w==", "dev": true, "requires": { - "import-local": "^2.0.0", - "jest-cli": "^24.9.0" + "@jest/core": "^25.1.0", + "import-local": "^3.0.2", + "jest-cli": "^25.1.0" }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" } }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } }, "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, "get-caller-file": { @@ -9614,41 +8956,56 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "import-local": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "jest-cli": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.9.0.tgz", - "integrity": "sha512-+VLRKyitT3BWoMeSUIHRxV/2g8y9gw91Jh5z2UmXZzkZKpbC08CSehVxgHUwTpy+HwGcns/tqafQDJW7imYvGg==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-25.1.0.tgz", + "integrity": "sha512-p+aOfczzzKdo3AsLJlhs8J5EW6ffVidfSZZxXedJ0mHPBOln1DccqFmGCoO8JWd4xRycfmwy1eoQkMsF8oekPg==", "dev": true, "requires": { - "@jest/core": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", + "@jest/core": "^25.1.0", + "@jest/test-result": "^25.1.0", + "@jest/types": "^25.1.0", + "chalk": "^3.0.0", "exit": "^0.1.2", - "import-local": "^2.0.0", + "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", + "jest-config": "^25.1.0", + "jest-util": "^25.1.0", + "jest-validate": "^25.1.0", "prompts": "^2.0.1", "realpath-native": "^1.1.0", - "yargs": "^13.3.0" + "yargs": "^15.0.0" } }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "^4.1.0" } }, "p-limit": { @@ -9661,12 +9018,12 @@ } }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "^2.2.0" } }, "p-try": { @@ -9675,41 +9032,80 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" } }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, "y18n": { @@ -9719,27 +9115,28 @@ "dev": true }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", + "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^3.0.0", + "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "yargs-parser": "^18.1.1" } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "18.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.1.tgz", + "integrity": "sha512-KRHEsOM16IX7XuLnMOqImcPNbLVXMNHYAoFc3BKR8Ortl5gzDbtXvvEoGx9imk5E+X1VeNKNlcHr8B8vi+7ipA==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -9759,410 +9156,630 @@ } }, "jest-changed-files": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.9.0.tgz", - "integrity": "sha512-6aTWpe2mHF0DhL28WjdkO8LyGjs3zItPET4bMSeXU6T3ub4FPMw+mcOcbdGXQOAfmLcxofD23/5Bl9Z4AkFwqg==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-25.1.0.tgz", + "integrity": "sha512-bdL1aHjIVy3HaBO3eEQeemGttsq1BDlHgWcOjEOIAcga7OOEGWHD2WSu8HhL7I1F0mFFyci8VKU4tRNk+qtwDA==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "execa": "^1.0.0", - "throat": "^4.0.0" + "@jest/types": "^25.1.0", + "execa": "^3.2.0", + "throat": "^5.0.0" }, "dependencies": { "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", + "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-3.4.0.tgz", + "integrity": "sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==", "dev": true, "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "p-finally": "^2.0.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" } }, "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", "dev": true, "requires": { "pump": "^3.0.0" } }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "p-finally": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", + "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } } } }, "jest-config": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.9.0.tgz", - "integrity": "sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-25.1.0.tgz", + "integrity": "sha512-tLmsg4SZ5H7tuhBC5bOja0HEblM0coS3Wy5LTCb2C8ZV6eWLewHyK+3qSq9Bi29zmWQ7ojdCd3pxpx4l4d2uGw==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^24.9.0", - "@jest/types": "^24.9.0", - "babel-jest": "^24.9.0", - "chalk": "^2.0.1", + "@jest/test-sequencer": "^25.1.0", + "@jest/types": "^25.1.0", + "babel-jest": "^25.1.0", + "chalk": "^3.0.0", "glob": "^7.1.1", - "jest-environment-jsdom": "^24.9.0", - "jest-environment-node": "^24.9.0", - "jest-get-type": "^24.9.0", - "jest-jasmine2": "^24.9.0", - "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", - "micromatch": "^3.1.10", - "pretty-format": "^24.9.0", + "jest-environment-jsdom": "^25.1.0", + "jest-environment-node": "^25.1.0", + "jest-get-type": "^25.1.0", + "jest-jasmine2": "^25.1.0", + "jest-regex-util": "^25.1.0", + "jest-resolve": "^25.1.0", + "jest-util": "^25.1.0", + "jest-validate": "^25.1.0", + "micromatch": "^4.0.2", + "pretty-format": "^25.1.0", "realpath-native": "^1.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "jest-diff": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz", - "integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-25.1.0.tgz", + "integrity": "sha512-nepXgajT+h017APJTreSieh4zCqnSHEJ1iT8HDlewu630lSJ4Kjjr9KNzm+kzGwwcpsDE6Snx1GJGzzsefaEHw==", "dev": true, "requires": { - "chalk": "^2.0.1", - "diff-sequences": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" + "chalk": "^3.0.0", + "diff-sequences": "^25.1.0", + "jest-get-type": "^25.1.0", + "pretty-format": "^25.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "jest-docblock": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.9.0.tgz", - "integrity": "sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-25.1.0.tgz", + "integrity": "sha512-370P/mh1wzoef6hUKiaMcsPtIapY25suP6JqM70V9RJvdKLrV4GaGbfUseUVk4FZJw4oTZ1qSCJNdrClKt5JQA==", "dev": true, "requires": { - "detect-newline": "^2.1.0" + "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.9.0.tgz", - "integrity": "sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog==", - "dev": true, - "requires": { - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", - "jest-get-type": "^24.9.0", - "jest-util": "^24.9.0", - "pretty-format": "^24.9.0" - } - }, - "jest-environment-jsdom": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz", - "integrity": "sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-25.1.0.tgz", + "integrity": "sha512-R9EL8xWzoPySJ5wa0DXFTj7NrzKpRD40Jy+zQDp3Qr/2QmevJgkN9GqioCGtAJ2bW9P/MQRznQHQQhoeAyra7A==", "dev": true, "requires": { - "@jest/environment": "^24.9.0", - "@jest/fake-timers": "^24.9.0", - "@jest/types": "^24.9.0", - "jest-mock": "^24.9.0", - "jest-util": "^24.9.0", - "jsdom": "^11.5.1" - } - }, - "jest-environment-jsdom-fifteen": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom-fifteen/-/jest-environment-jsdom-fifteen-1.0.2.tgz", - "integrity": "sha512-nfrnAfwklE1872LIB31HcjM65cWTh1wzvMSp10IYtPJjLDUbTTvDpajZgIxUnhRmzGvogdHDayCIlerLK0OBBg==", - "dev": true, - "requires": { - "@jest/environment": "^24.3.0", - "@jest/fake-timers": "^24.3.0", - "@jest/types": "^24.3.0", - "jest-mock": "^24.0.0", - "jest-util": "^24.0.0", - "jsdom": "^15.2.1" + "@jest/types": "^25.1.0", + "chalk": "^3.0.0", + "jest-get-type": "^25.1.0", + "jest-util": "^25.1.0", + "pretty-format": "^25.1.0" }, "dependencies": { - "acorn": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", - "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", - "dev": true - }, - "cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", - "dev": true - }, - "cssstyle": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.0.0.tgz", - "integrity": "sha512-QXSAu2WBsSRXCPjvI43Y40m6fMevvyRm8JVAuF9ksQz5jha4pWP1wpaK7Yu5oLFc6+XAY+hj8YhefyXcBB53gg==", + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", "dev": true, "requires": { - "cssom": "~0.3.6" - }, - "dependencies": { - "cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true - } + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" } }, - "escodegen": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.13.0.tgz", - "integrity": "sha512-eYk2dCkxR07DsHA/X2hRBj0CFAZeri/LyDMc0C8JT1Hqi6JnVpMhJ7XFITbb0+yZS3lVkaPL2oCkZ3AVmeVbMw==", + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", "dev": true, "requires": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - } - }, - "jsdom": { - "version": "15.2.1", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-15.2.1.tgz", - "integrity": "sha512-fAl1W0/7T2G5vURSyxBzrJ1LSdQn6Tr5UX/xD4PXDx/PDgwygedfW6El/KIj3xJ7FU61TTYnc/l/B7P49Eqt6g==", - "dev": true, - "requires": { - "abab": "^2.0.0", - "acorn": "^7.1.0", - "acorn-globals": "^4.3.2", - "array-equal": "^1.0.0", - "cssom": "^0.4.1", - "cssstyle": "^2.0.0", - "data-urls": "^1.1.0", - "domexception": "^1.0.1", - "escodegen": "^1.11.1", - "html-encoding-sniffer": "^1.0.2", - "nwsapi": "^2.2.0", - "parse5": "5.1.0", - "pn": "^1.1.0", - "request": "^2.88.0", - "request-promise-native": "^1.0.7", - "saxes": "^3.1.9", - "symbol-tree": "^3.2.2", - "tough-cookie": "^3.0.1", - "w3c-hr-time": "^1.0.1", - "w3c-xmlserializer": "^1.1.2", - "webidl-conversions": "^4.0.2", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^7.0.0", - "ws": "^7.0.0", - "xml-name-validator": "^3.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "parse5": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz", - "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==", - "dev": true - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - }, - "tough-cookie": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", - "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "ip-regex": "^2.1.0", - "psl": "^1.1.28", - "punycode": "^2.1.1" + "color-name": "~1.1.4" } }, - "whatwg-url": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { "version": "7.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", - "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", "dev": true, "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" + "has-flag": "^4.0.0" } - }, - "ws": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.1.tgz", - "integrity": "sha512-sucePNSafamSKoOqoNfBd8V0StlkzJKL2ZAhGQinCfNQ+oacw+Pk7lcdAElecBF2VkLNZRiIb5Oi1Q5lVUVt2A==", - "dev": true } } }, + "jest-environment-jsdom": { + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-25.1.0.tgz", + "integrity": "sha512-ILb4wdrwPAOHX6W82GGDUiaXSSOE274ciuov0lztOIymTChKFtC02ddyicRRCdZlB5YSrv3vzr1Z5xjpEe1OHQ==", + "dev": true, + "requires": { + "@jest/environment": "^25.1.0", + "@jest/fake-timers": "^25.1.0", + "@jest/types": "^25.1.0", + "jest-mock": "^25.1.0", + "jest-util": "^25.1.0", + "jsdom": "^15.1.1" + } + }, "jest-environment-node": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.9.0.tgz", - "integrity": "sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-25.1.0.tgz", + "integrity": "sha512-U9kFWTtAPvhgYY5upnH9rq8qZkj6mYLup5l1caAjjx9uNnkLHN2xgZy5mo4SyLdmrh/EtB9UPpKFShvfQHD0Iw==", "dev": true, "requires": { - "@jest/environment": "^24.9.0", - "@jest/fake-timers": "^24.9.0", - "@jest/types": "^24.9.0", - "jest-mock": "^24.9.0", - "jest-util": "^24.9.0" + "@jest/environment": "^25.1.0", + "@jest/fake-timers": "^25.1.0", + "@jest/types": "^25.1.0", + "jest-mock": "^25.1.0", + "jest-util": "^25.1.0" } }, "jest-get-type": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", - "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-25.1.0.tgz", + "integrity": "sha512-yWkBnT+5tMr8ANB6V+OjmrIJufHtCAqI5ic2H40v+tRqxDmE0PGnIiTyvRWFOMtmVHYpwRqyazDbTnhpjsGvLw==", "dev": true }, "jest-haste-map": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.9.0.tgz", - "integrity": "sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-25.1.0.tgz", + "integrity": "sha512-/2oYINIdnQZAqyWSn1GTku571aAfs8NxzSErGek65Iu5o8JYb+113bZysRMcC/pjE5v9w0Yz+ldbj9NxrFyPyw==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "anymatch": "^2.0.0", + "@jest/types": "^25.1.0", + "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", - "fsevents": "^1.2.7", - "graceful-fs": "^4.1.15", - "invariant": "^2.2.4", - "jest-serializer": "^24.9.0", - "jest-util": "^24.9.0", - "jest-worker": "^24.9.0", - "micromatch": "^3.1.10", + "fsevents": "2.1.2", + "graceful-fs": "^4.2.3", + "jest-serializer": "^25.1.0", + "jest-util": "^25.1.0", + "jest-worker": "^25.1.0", + "micromatch": "^4.0.2", "sane": "^4.0.3", "walker": "^1.0.7" }, "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "fsevents": { + "version": "2.1.2" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-worker": { + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-25.1.0.tgz", + "integrity": "sha512-ZHhHtlxOWSxCoNOKHGbiLzXnl42ga9CxDr27H36Qn+15pQZd3R/F24jrmjDelw9j/iHUIWMWs08/u2QN50HHOg==", "dev": true, "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" } }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", "dev": true, "requires": { - "remove-trailing-separator": "^1.0.1" + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" } } } }, "jest-jasmine2": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.9.0.tgz", - "integrity": "sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-25.1.0.tgz", + "integrity": "sha512-GdncRq7jJ7sNIQ+dnXvpKO2MyP6j3naNK41DTTjEAhLEdpImaDA9zSAZwDhijjSF/D7cf4O5fdyUApGBZleaEg==", "dev": true, "requires": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", + "@jest/environment": "^25.1.0", + "@jest/source-map": "^25.1.0", + "@jest/test-result": "^25.1.0", + "@jest/types": "^25.1.0", + "chalk": "^3.0.0", "co": "^4.6.0", - "expect": "^24.9.0", + "expect": "^25.1.0", "is-generator-fn": "^2.0.0", - "jest-each": "^24.9.0", - "jest-matcher-utils": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-snapshot": "^24.9.0", - "jest-util": "^24.9.0", - "pretty-format": "^24.9.0", - "throat": "^4.0.0" + "jest-each": "^25.1.0", + "jest-matcher-utils": "^25.1.0", + "jest-message-util": "^25.1.0", + "jest-runtime": "^25.1.0", + "jest-snapshot": "^25.1.0", + "jest-util": "^25.1.0", + "pretty-format": "^25.1.0", + "throat": "^5.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "jest-leak-detector": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.9.0.tgz", - "integrity": "sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-25.1.0.tgz", + "integrity": "sha512-3xRI264dnhGaMHRvkFyEKpDeaRzcEBhyNrOG5oT8xPxOyUAblIAQnpiR3QXu4wDor47MDTiHbiFcbypdLcLW5w==", "dev": true, "requires": { - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" + "jest-get-type": "^25.1.0", + "pretty-format": "^25.1.0" } }, "jest-matcher-utils": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz", - "integrity": "sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-25.1.0.tgz", + "integrity": "sha512-KGOAFcSFbclXIFE7bS4C53iYobKI20ZWleAdAFun4W1Wz1Kkej8Ng6RRbhL8leaEvIOjGXhGf/a1JjO8bkxIWQ==", "dev": true, "requires": { - "chalk": "^2.0.1", - "jest-diff": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" + "chalk": "^3.0.0", + "jest-diff": "^25.1.0", + "jest-get-type": "^25.1.0", + "pretty-format": "^25.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "jest-message-util": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", - "integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-25.1.0.tgz", + "integrity": "sha512-Nr/Iwar2COfN22aCqX0kCVbXgn8IBm9nWf4xwGr5Olv/KZh0CZ32RKgZWMVDXGdOahicM10/fgjdimGNX/ttCQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", + "@jest/test-result": "^25.1.0", + "@jest/types": "^25.1.0", "@types/stack-utils": "^1.0.1", - "chalk": "^2.0.1", - "micromatch": "^3.1.10", - "slash": "^2.0.0", + "chalk": "^3.0.0", + "micromatch": "^4.0.2", + "slash": "^3.0.0", "stack-utils": "^1.0.1" }, "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, "jest-mock": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.9.0.tgz", - "integrity": "sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-25.1.0.tgz", + "integrity": "sha512-28/u0sqS+42vIfcd1mlcg4ZVDmSUYuNvImP4X2lX5hRMLW+CN0BeiKVD4p+ujKKbSPKd3rg/zuhCF+QBLJ4vag==", "dev": true, "requires": { - "@jest/types": "^24.9.0" + "@jest/types": "^25.1.0" } }, "jest-pnp-resolver": { @@ -10172,140 +9789,267 @@ "dev": true }, "jest-preset-angular": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/jest-preset-angular/-/jest-preset-angular-8.0.0.tgz", - "integrity": "sha512-POQUTOdZwHJOFTr8lT+bR9da1L5ItRPQSjC1gyKf3wXO9ct2Ht08CO60dYDshivfewThdqzMeVYzgM9tEssw2A==", + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/jest-preset-angular/-/jest-preset-angular-8.1.2.tgz", + "integrity": "sha512-a6RPuWIUAnEBq3nsgwh6B+ZaJ1wYF7ChvNNBp4vS9lM9OG8r2waa4+OpIQDZJ9ptERDsPC2vjr6QY3R0ai9vcw==", "dev": true, "requires": { - "jest-environment-jsdom-fifteen": "^1.0.0", - "pretty-format": "^24.0.0", - "ts-jest": "^24.0.0" + "pretty-format": "^25.0.0", + "ts-jest": "^25.0.0" } }, "jest-regex-util": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.9.0.tgz", - "integrity": "sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-25.1.0.tgz", + "integrity": "sha512-9lShaDmDpqwg+xAd73zHydKrBbbrIi08Kk9YryBEBybQFg/lBWR/2BDjjiSE7KIppM9C5+c03XiDaZ+m4Pgs1w==", "dev": true }, "jest-resolve": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.9.0.tgz", - "integrity": "sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-25.1.0.tgz", + "integrity": "sha512-XkBQaU1SRCHj2Evz2Lu4Czs+uIgJXWypfO57L7JYccmAXv4slXA6hzNblmcRmf7P3cQ1mE7fL3ABV6jAwk4foQ==", "dev": true, "requires": { - "@jest/types": "^24.9.0", + "@jest/types": "^25.1.0", "browser-resolve": "^1.11.3", - "chalk": "^2.0.1", + "chalk": "^3.0.0", "jest-pnp-resolver": "^1.2.1", "realpath-native": "^1.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "jest-resolve-dependencies": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.9.0.tgz", - "integrity": "sha512-Fm7b6AlWnYhT0BXy4hXpactHIqER7erNgIsIozDXWl5dVm+k8XdGVe1oTg1JyaFnOxarMEbax3wyRJqGP2Pq+g==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-25.1.0.tgz", + "integrity": "sha512-Cu/Je38GSsccNy4I2vL12ZnBlD170x2Oh1devzuM9TLH5rrnLW1x51lN8kpZLYTvzx9j+77Y5pqBaTqfdzVzrw==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "jest-regex-util": "^24.3.0", - "jest-snapshot": "^24.9.0" + "@jest/types": "^25.1.0", + "jest-regex-util": "^25.1.0", + "jest-snapshot": "^25.1.0" } }, "jest-runner": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.9.0.tgz", - "integrity": "sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-25.1.0.tgz", + "integrity": "sha512-su3O5fy0ehwgt+e8Wy7A8CaxxAOCMzL4gUBftSs0Ip32S0epxyZPDov9Znvkl1nhVOJNf4UwAsnqfc3plfQH9w==", "dev": true, "requires": { - "@jest/console": "^24.7.1", - "@jest/environment": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "chalk": "^2.4.2", + "@jest/console": "^25.1.0", + "@jest/environment": "^25.1.0", + "@jest/test-result": "^25.1.0", + "@jest/types": "^25.1.0", + "chalk": "^3.0.0", "exit": "^0.1.2", - "graceful-fs": "^4.1.15", - "jest-config": "^24.9.0", - "jest-docblock": "^24.3.0", - "jest-haste-map": "^24.9.0", - "jest-jasmine2": "^24.9.0", - "jest-leak-detector": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-resolve": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-util": "^24.9.0", - "jest-worker": "^24.6.0", + "graceful-fs": "^4.2.3", + "jest-config": "^25.1.0", + "jest-docblock": "^25.1.0", + "jest-haste-map": "^25.1.0", + "jest-jasmine2": "^25.1.0", + "jest-leak-detector": "^25.1.0", + "jest-message-util": "^25.1.0", + "jest-resolve": "^25.1.0", + "jest-runtime": "^25.1.0", + "jest-util": "^25.1.0", + "jest-worker": "^25.1.0", "source-map-support": "^0.5.6", - "throat": "^4.0.0" + "throat": "^5.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-worker": { + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-25.1.0.tgz", + "integrity": "sha512-ZHhHtlxOWSxCoNOKHGbiLzXnl42ga9CxDr27H36Qn+15pQZd3R/F24jrmjDelw9j/iHUIWMWs08/u2QN50HHOg==", + "dev": true, + "requires": { + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "jest-runtime": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.9.0.tgz", - "integrity": "sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw==", - "dev": true, - "requires": { - "@jest/console": "^24.7.1", - "@jest/environment": "^24.9.0", - "@jest/source-map": "^24.3.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/yargs": "^13.0.0", - "chalk": "^2.0.1", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-25.1.0.tgz", + "integrity": "sha512-mpPYYEdbExKBIBB16ryF6FLZTc1Rbk9Nx0ryIpIMiDDkOeGa0jQOKVI/QeGvVGlunKKm62ywcioeFVzIbK03bA==", + "dev": true, + "requires": { + "@jest/console": "^25.1.0", + "@jest/environment": "^25.1.0", + "@jest/source-map": "^25.1.0", + "@jest/test-result": "^25.1.0", + "@jest/transform": "^25.1.0", + "@jest/types": "^25.1.0", + "@types/yargs": "^15.0.0", + "chalk": "^3.0.0", + "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", - "graceful-fs": "^4.1.15", - "jest-config": "^24.9.0", - "jest-haste-map": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-mock": "^24.9.0", - "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.9.0", - "jest-snapshot": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", + "graceful-fs": "^4.2.3", + "jest-config": "^25.1.0", + "jest-haste-map": "^25.1.0", + "jest-message-util": "^25.1.0", + "jest-mock": "^25.1.0", + "jest-regex-util": "^25.1.0", + "jest-resolve": "^25.1.0", + "jest-snapshot": "^25.1.0", + "jest-util": "^25.1.0", + "jest-validate": "^25.1.0", "realpath-native": "^1.1.0", - "slash": "^2.0.0", - "strip-bom": "^3.0.0", - "yargs": "^13.3.0" + "slash": "^3.0.0", + "strip-bom": "^4.0.0", + "yargs": "^15.0.0" }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" } }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } }, "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "locate-path": "^3.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, "get-caller-file": { @@ -10328,20 +10072,25 @@ "path-is-absolute": "^1.0.0" } }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" + "p-locate": "^4.1.0" } }, "p-limit": { @@ -10354,12 +10103,12 @@ } }, "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "p-limit": "^2.0.0" + "p-limit": "^2.2.0" } }, "p-try": { @@ -10368,6 +10117,12 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -10375,40 +10130,49 @@ "dev": true }, "slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" } }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, "y18n": { @@ -10418,27 +10182,28 @@ "dev": true }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", + "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", "dev": true, "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^3.0.0", + "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "yargs-parser": "^18.1.1" } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "18.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.1.tgz", + "integrity": "sha512-KRHEsOM16IX7XuLnMOqImcPNbLVXMNHYAoFc3BKR8Ortl5gzDbtXvvEoGx9imk5E+X1VeNKNlcHr8B8vi+7ipA==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -10448,68 +10213,136 @@ } }, "jest-serializer": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.9.0.tgz", - "integrity": "sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-25.1.0.tgz", + "integrity": "sha512-20Wkq5j7o84kssBwvyuJ7Xhn7hdPeTXndnwIblKDR2/sy1SUm6rWWiG9kSCgJPIfkDScJCIsTtOKdlzfIHOfKA==", "dev": true }, "jest-silent-reporter": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/jest-silent-reporter/-/jest-silent-reporter-0.1.2.tgz", - "integrity": "sha512-w/qc9NvWqdX0vZv6TUG4EE15d72+JxQJYh+3hqq8cTi3BnfBOtwNtL3T6TwkZSy/sfc3REW5niz0eSBPTIvWnA==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/jest-silent-reporter/-/jest-silent-reporter-0.2.1.tgz", + "integrity": "sha512-nEO3oOFHtEXFjlRCbJOlvEWA7ZHyyyvMsU4WHuAhinYBOI4PiX1EIbsZfQZ/cxHcYliHBU9zY8bPxMPdBGksYw==", "dev": true, "requires": { "chalk": "^2.3.1", "jest-util": "^24.0.0" - } - }, - "jest-snapshot": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.9.0.tgz", - "integrity": "sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0", - "@jest/types": "^24.9.0", - "chalk": "^2.0.1", - "expect": "^24.9.0", - "jest-diff": "^24.9.0", - "jest-get-type": "^24.9.0", - "jest-matcher-utils": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-resolve": "^24.9.0", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "pretty-format": "^24.9.0", - "semver": "^6.2.0" - } - }, - "jest-util": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.9.0.tgz", - "integrity": "sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg==", - "dev": true, - "requires": { - "@jest/console": "^24.9.0", - "@jest/fake-timers": "^24.9.0", - "@jest/source-map": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "callsites": "^3.0.0", - "chalk": "^2.0.1", - "graceful-fs": "^4.1.15", - "is-ci": "^2.0.0", - "mkdirp": "^0.5.1", - "slash": "^2.0.0", - "source-map": "^0.6.0" }, "dependencies": { + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } + }, + "@jest/fake-timers": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.9.0.tgz", + "integrity": "sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-mock": "^24.9.0" + } + }, + "@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + } + }, + "@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + } + }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.8", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.8.tgz", + "integrity": "sha512-XAvHLwG7UQ+8M4caKIH0ZozIOYay5fQkAgyIXegXT9jPtdIGdhga+sUEdAr1CiG46aB+c64xQEYyEzlwWVTNzA==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, + "jest-message-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", + "integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/stack-utils": "^1.0.1", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" + } + }, + "jest-mock": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.9.0.tgz", + "integrity": "sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0" + } + }, + "jest-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.9.0.tgz", + "integrity": "sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/fake-timers": "^24.9.0", + "@jest/source-map": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "callsites": "^3.0.0", + "chalk": "^2.0.1", + "graceful-fs": "^4.1.15", + "is-ci": "^2.0.0", + "mkdirp": "^0.5.1", + "slash": "^2.0.0", + "source-map": "^0.6.0" + } + }, "slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", @@ -10524,48 +10357,260 @@ } } }, + "jest-snapshot": { + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-25.1.0.tgz", + "integrity": "sha512-xZ73dFYN8b/+X2hKLXz4VpBZGIAn7muD/DAg+pXtDzDGw3iIV10jM7WiHqhCcpDZfGiKEj7/2HXAEPtHTj0P2A==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0", + "@jest/types": "^25.1.0", + "chalk": "^3.0.0", + "expect": "^25.1.0", + "jest-diff": "^25.1.0", + "jest-get-type": "^25.1.0", + "jest-matcher-utils": "^25.1.0", + "jest-message-util": "^25.1.0", + "jest-resolve": "^25.1.0", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "pretty-format": "^25.1.0", + "semver": "^7.1.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "semver": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.1.3.tgz", + "integrity": "sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "jest-util": { + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-25.1.0.tgz", + "integrity": "sha512-7did6pLQ++87Qsj26Fs/TIwZMUFBXQ+4XXSodRNy3luch2DnRXsSnmpVtxxQ0Yd6WTipGpbhh2IFP1mq6/fQGw==", + "dev": true, + "requires": { + "@jest/types": "^25.1.0", + "chalk": "^3.0.0", + "is-ci": "^2.0.0", + "mkdirp": "^0.5.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "jest-validate": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.9.0.tgz", - "integrity": "sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-25.1.0.tgz", + "integrity": "sha512-kGbZq1f02/zVO2+t1KQGSVoCTERc5XeObLwITqC6BTRH3Adv7NZdYqCpKIZLUgpLXf2yISzQ465qOZpul8abXA==", "dev": true, "requires": { - "@jest/types": "^24.9.0", + "@jest/types": "^25.1.0", "camelcase": "^5.3.1", - "chalk": "^2.0.1", - "jest-get-type": "^24.9.0", + "chalk": "^3.0.0", + "jest-get-type": "^25.1.0", "leven": "^3.1.0", - "pretty-format": "^24.9.0" + "pretty-format": "^25.1.0" }, "dependencies": { + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, "jest-watcher": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.9.0.tgz", - "integrity": "sha512-+/fLOfKPXXYJDYlks62/4R4GoT+GU1tYZed99JSCOsmzkkF7727RqKrjNAxtfO4YpGv11wybgRvCjR73lK2GZw==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-25.1.0.tgz", + "integrity": "sha512-Q9eZ7pyaIr6xfU24OeTg4z1fUqBF/4MP6J801lyQfg7CsnZ/TCzAPvCfckKdL5dlBBEKBeHV0AdyjFZ5eWj4ig==", "dev": true, "requires": { - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/yargs": "^13.0.0", - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.1", - "jest-util": "^24.9.0", - "string-length": "^2.0.0" + "@jest/test-result": "^25.1.0", + "@jest/types": "^25.1.0", + "ansi-escapes": "^4.2.1", + "chalk": "^3.0.0", + "jest-util": "^25.1.0", + "string-length": "^3.1.0" }, "dependencies": { - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, @@ -10596,12 +10641,6 @@ "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", "dev": true }, - "js-levenshtein": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", - "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", - "dev": true - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -10625,59 +10664,93 @@ "dev": true }, "jsdom": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", - "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", + "version": "15.2.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-15.2.1.tgz", + "integrity": "sha512-fAl1W0/7T2G5vURSyxBzrJ1LSdQn6Tr5UX/xD4PXDx/PDgwygedfW6El/KIj3xJ7FU61TTYnc/l/B7P49Eqt6g==", "dev": true, "requires": { "abab": "^2.0.0", - "acorn": "^5.5.3", - "acorn-globals": "^4.1.0", + "acorn": "^7.1.0", + "acorn-globals": "^4.3.2", "array-equal": "^1.0.0", - "cssom": ">= 0.3.2 < 0.4.0", - "cssstyle": "^1.0.0", - "data-urls": "^1.0.0", + "cssom": "^0.4.1", + "cssstyle": "^2.0.0", + "data-urls": "^1.1.0", "domexception": "^1.0.1", - "escodegen": "^1.9.1", + "escodegen": "^1.11.1", "html-encoding-sniffer": "^1.0.2", - "left-pad": "^1.3.0", - "nwsapi": "^2.0.7", - "parse5": "4.0.0", + "nwsapi": "^2.2.0", + "parse5": "5.1.0", "pn": "^1.1.0", - "request": "^2.87.0", - "request-promise-native": "^1.0.5", - "sax": "^1.2.4", + "request": "^2.88.0", + "request-promise-native": "^1.0.7", + "saxes": "^3.1.9", "symbol-tree": "^3.2.2", - "tough-cookie": "^2.3.4", + "tough-cookie": "^3.0.1", "w3c-hr-time": "^1.0.1", + "w3c-xmlserializer": "^1.1.2", "webidl-conversions": "^4.0.2", - "whatwg-encoding": "^1.0.3", - "whatwg-mimetype": "^2.1.0", - "whatwg-url": "^6.4.1", - "ws": "^5.2.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^7.0.0", + "ws": "^7.0.0", "xml-name-validator": "^3.0.0" }, "dependencies": { "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", "dev": true }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "escodegen": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.1.tgz", + "integrity": "sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ==", + "dev": true, + "requires": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + } + }, + "parse5": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz", + "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==", "dev": true }, - "ws": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", - "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + }, + "tough-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", + "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", "dev": true, "requires": { - "async-limiter": "~1.0.0" + "ip-regex": "^2.1.0", + "psl": "^1.1.28", + "punycode": "^2.1.1" } + }, + "ws": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz", + "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==", + "dev": true } } }, @@ -10738,7 +10811,12 @@ "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", "dev": true, "requires": { - "minimist": "^1.2.0" + "minimist": "1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5" + } } }, "jsonfile": { @@ -10824,12 +10902,6 @@ "invert-kv": "^1.0.0" } }, - "left-pad": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", - "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==", - "dev": true - }, "less": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/less/-/less-3.9.0.tgz", @@ -10873,6 +10945,15 @@ "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", "dev": true }, + "levenary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", + "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", + "dev": true, + "requires": { + "leven": "^3.1.0" + } + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -11012,7 +11093,7 @@ "anymatch": "^2.0.0", "async-each": "^1.0.1", "braces": "^2.3.2", - "fsevents": "^1.2.7", + "fsevents": "2.1.2", "glob-parent": "^3.1.0", "inherits": "^2.0.3", "is-binary-path": "^1.0.0", @@ -11024,562 +11105,7 @@ }, "dependencies": { "fsevents": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", - "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1", - "node-pre-gyp": "*" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "3.2.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.9.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.14.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.1", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.13", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.1.1", - "bundled": true, - "dev": true, - "optional": true - } - } + "version": "2.1.2" } } }, @@ -11637,28 +11163,34 @@ } }, "fsevents": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", - "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "dev": true, + "optional": true, + "requires": { + "node-pre-gyp": "*" + }, "dependencies": { "abbrev": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", "bundled": true, + "dev": true, "optional": true }, "aproba": { "version": "1.2.0", "bundled": true, + "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", "bundled": true, + "dev": true, "optional": true, "requires": { "delegates": "^1.0.0", @@ -11668,11 +11200,13 @@ "balanced-match": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "dev": true, "optional": true, "requires": { "balanced-match": "^1.0.0", @@ -11682,31 +11216,37 @@ "chownr": { "version": "1.1.3", "bundled": true, + "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", "bundled": true, + "dev": true, "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, + "dev": true, "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, + "dev": true, "optional": true }, "core-util-is": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "debug": { "version": "3.2.6", "bundled": true, + "dev": true, "optional": true, "requires": { "ms": "^2.1.1" @@ -11715,21 +11255,25 @@ "deep-extend": { "version": "0.6.0", "bundled": true, + "dev": true, "optional": true }, "delegates": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", "bundled": true, + "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.7", "bundled": true, + "dev": true, "optional": true, "requires": { "minipass": "^2.6.0" @@ -11738,11 +11282,13 @@ "fs.realpath": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "gauge": { "version": "2.7.4", "bundled": true, + "dev": true, "optional": true, "requires": { "aproba": "^1.0.3", @@ -11758,6 +11304,7 @@ "glob": { "version": "7.1.6", "bundled": true, + "dev": true, "optional": true, "requires": { "fs.realpath": "^1.0.0", @@ -11771,11 +11318,13 @@ "has-unicode": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.24", "bundled": true, + "dev": true, "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -11784,6 +11333,7 @@ "ignore-walk": { "version": "3.0.3", "bundled": true, + "dev": true, "optional": true, "requires": { "minimatch": "^3.0.4" @@ -11792,6 +11342,7 @@ "inflight": { "version": "1.0.6", "bundled": true, + "dev": true, "optional": true, "requires": { "once": "^1.3.0", @@ -11801,16 +11352,19 @@ "inherits": { "version": "2.0.4", "bundled": true, + "dev": true, "optional": true }, "ini": { "version": "1.3.5", "bundled": true, + "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true, "requires": { "number-is-nan": "^1.0.0" @@ -11819,24 +11373,27 @@ "isarray": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", "bundled": true, + "dev": true, "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "0.0.8", - "bundled": true, - "optional": true + "dev": true, + "optional": true, + "version": "1.2.5" }, "minipass": { "version": "2.9.0", "bundled": true, + "dev": true, "optional": true, "requires": { "safe-buffer": "^5.1.2", @@ -11846,6 +11403,7 @@ "minizlib": { "version": "1.3.3", "bundled": true, + "dev": true, "optional": true, "requires": { "minipass": "^2.9.0" @@ -11854,19 +11412,27 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "dev": true, "optional": true, "requires": { - "minimist": "0.0.8" + "minimist": "1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5" + } } }, "ms": { "version": "2.1.2", "bundled": true, + "dev": true, "optional": true }, "needle": { "version": "2.4.0", "bundled": true, + "dev": true, "optional": true, "requires": { "debug": "^3.2.6", @@ -11877,6 +11443,8 @@ "node-pre-gyp": { "version": "0.14.0", "bundled": true, + "dev": true, + "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", @@ -11893,6 +11461,7 @@ "nopt": { "version": "4.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "abbrev": "1", @@ -11902,6 +11471,7 @@ "npm-bundled": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true, "requires": { "npm-normalize-package-bin": "^1.0.1" @@ -11910,11 +11480,13 @@ "npm-normalize-package-bin": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "npm-packlist": { "version": "1.4.7", "bundled": true, + "dev": true, "optional": true, "requires": { "ignore-walk": "^3.0.1", @@ -11924,6 +11496,7 @@ "npmlog": { "version": "4.1.2", "bundled": true, + "dev": true, "optional": true, "requires": { "are-we-there-yet": "~1.1.2", @@ -11935,16 +11508,19 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", "bundled": true, + "dev": true, "optional": true }, "once": { "version": "1.4.0", "bundled": true, + "dev": true, "optional": true, "requires": { "wrappy": "1" @@ -11953,16 +11529,19 @@ "os-homedir": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "osenv": { "version": "0.1.5", "bundled": true, + "dev": true, "optional": true, "requires": { "os-homedir": "^1.0.0", @@ -11972,34 +11551,36 @@ "path-is-absolute": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "rc": { "version": "1.2.8", "bundled": true, + "dev": true, "optional": true, "requires": { "deep-extend": "^0.6.0", "ini": "~1.3.0", - "minimist": "^1.2.0", + "minimist": "1.2.5", "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { - "version": "1.2.0", - "bundled": true, - "optional": true + "version": "1.2.5" } } }, "readable-stream": { "version": "2.3.6", "bundled": true, + "dev": true, "optional": true, "requires": { "core-util-is": "~1.0.0", @@ -12014,6 +11595,7 @@ "rimraf": { "version": "2.7.1", "bundled": true, + "dev": true, "optional": true, "requires": { "glob": "^7.1.3" @@ -12022,36 +11604,43 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, + "dev": true, "optional": true }, "safer-buffer": { "version": "2.1.2", "bundled": true, + "dev": true, "optional": true }, "sax": { "version": "1.2.4", "bundled": true, + "dev": true, "optional": true }, "semver": { "version": "5.7.1", "bundled": true, + "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", "bundled": true, + "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", "bundled": true, + "dev": true, "optional": true }, "string-width": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true, "requires": { "code-point-at": "^1.0.0", @@ -12062,6 +11651,7 @@ "string_decoder": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true, "requires": { "safe-buffer": "~5.1.0" @@ -12070,6 +11660,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "ansi-regex": "^2.0.0" @@ -12078,11 +11669,13 @@ "strip-json-comments": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "tar": { "version": "4.4.13", "bundled": true, + "dev": true, "optional": true, "requires": { "chownr": "^1.1.1", @@ -12097,11 +11690,13 @@ "util-deprecate": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "wide-align": { "version": "1.1.3", "bundled": true, + "dev": true, "optional": true, "requires": { "string-width": "^1.0.2 || 2" @@ -12110,14 +11705,17 @@ "wrappy": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "yallist": { "version": "3.1.1", "bundled": true, + "dev": true, "optional": true } - } + }, + "version": "2.1.2" }, "is-binary-path": { "version": "1.0.1", @@ -12228,6 +11826,12 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true } } }, @@ -12290,9 +11894,9 @@ "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=" }, "loglevel": { - "version": "1.6.6", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.6.tgz", - "integrity": "sha512-Sgr5lbboAUBo3eXCSPL4/KoVz3ROKquOjcctxmHIt+vol2DrqTQe3SwkKKuYhEiWB5kYa13YyopJ69deJ1irzQ==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.7.tgz", + "integrity": "sha512-cY2eLFrQSAfVPhCgH1s7JI73tMbg9YC3v3+ZHVW67sBS7UxWzNEk/ZBbSfLykBWHp33dqqtOv82gjhKEi81T/A==", "dev": true }, "loglevel-plugin-prefix": { @@ -12301,6 +11905,15 @@ "integrity": "sha512-WpG9CcFAOjz/FtNht+QJeGpvVl/cdR6P0z6OcXSkr8wFJOsV2GRj2j10JLfjuA4aYkcKCNIEqRGCyTife9R8/g==", "dev": true }, + "lolex": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-5.1.2.tgz", + "integrity": "sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -12359,9 +11972,9 @@ } }, "make-error": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", - "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, "make-fetch-happen": { @@ -12428,6 +12041,7 @@ "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, "requires": { "p-defer": "^1.0.0" } @@ -12477,12 +12091,10 @@ "dev": true }, "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", "requires": { "mimic-fn": "^1.0.0" - } + }, + "version": "4.3.0" }, "memory-fs": { "version": "0.4.1", @@ -12715,10 +12327,8 @@ } }, "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true + "dev": true, + "version": "1.2.5" }, "minipass": { "version": "2.9.0", @@ -12787,19 +12397,16 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", + "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", "dev": true, "requires": { - "minimist": "0.0.8" + "minimist": "1.2.5" }, "dependencies": { "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "version": "1.2.5" } } }, @@ -12903,13 +12510,6 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "dev": true, - "optional": true - }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -12997,13 +12597,6 @@ "@types/chart.js": "^2.7.48", "lodash": "^4.17.11", "tslib": "^1.9.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" - } } }, "ngx-bootstrap": { @@ -13026,9 +12619,9 @@ "dev": true }, "node-fetch-npm": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", - "integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.3.tgz", + "integrity": "sha512-DgwoKEsqLnFZtk3ap7GWBHcHwnUhsNmQqEDcdjfQ8GofLEFJ081NAd4Uin3R7RFZBWVJCwHISw1oaEqPgSLloA==", "dev": true, "requires": { "encoding": "^0.1.11", @@ -13086,30 +12679,32 @@ "dev": true }, "node-notifier": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.3.tgz", - "integrity": "sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-6.0.0.tgz", + "integrity": "sha512-SVfQ/wMw+DesunOm5cKqr6yDcvUTDl/yc97ybGHMrteNEY6oekXpNpS3lZwgLlwz0FLgHoiW28ZpmBHUDg37cw==", "dev": true, + "optional": true, "requires": { "growly": "^1.3.0", - "is-wsl": "^1.1.0", - "semver": "^5.5.0", + "is-wsl": "^2.1.1", + "semver": "^6.3.0", "shellwords": "^0.1.1", - "which": "^1.3.0" + "which": "^1.3.1" }, "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true + "is-wsl": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.1.1.tgz", + "integrity": "sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog==", + "dev": true, + "optional": true } } }, "node-releases": { - "version": "1.1.46", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.46.tgz", - "integrity": "sha512-YOjdx+Uoh9FbRO7yVYbnbt1puRWPQMemR3SutLeyv2XfxKs1ihpe0OLAUwBPEP2ImNH/PZC7SEiC6j32dwRZ7g==", + "version": "1.1.52", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.52.tgz", + "integrity": "sha512-snSiT1UypkgGt2wxPqS6ImEUICbNCMb31yaxWrOLXjhlt2z2/IBpaOxzONExqSm4y5oLnAqjjRWu+wsDzK5yNQ==", "dev": true, "requires": { "semver": "^6.3.0" @@ -13205,13 +12800,14 @@ } }, "npm-packlist": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.7.tgz", - "integrity": "sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ==", + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", + "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", "dev": true, "requires": { "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" } }, "npm-pick-manifest": { @@ -13234,9 +12830,9 @@ } }, "npm-registry-fetch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.2.tgz", - "integrity": "sha512-Z0IFtPEozNdeZRPh3aHHxdG+ZRpzcbQaJLthsm3VhNf6DScicTFRHZzK82u8RsJUsUHkX+QH/zcB/5pmd20H4A==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.3.tgz", + "integrity": "sha512-WGvUx0lkKFhu9MbiGFuT9nG2NpfQ+4dCJwRwwtK2HK5izJEvwDxMeUyqbuMS7N/OkpVCqDorV6rO5E4V9F8lJw==", "dev": true, "requires": { "JSONStream": "^1.3.4", @@ -13542,15 +13138,12 @@ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", "dev": true, "requires": { - "minimist": "~0.0.1", + "minimist": "1.2.5", "wordwrap": "~0.0.2" }, "dependencies": { "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", - "dev": true + "version": "1.2.5" } } }, @@ -13596,7 +13189,12 @@ "requires": { "execa": "^0.7.0", "lcid": "^1.0.0", - "mem": "^1.1.0" + "mem": "4.3.0" + }, + "dependencies": { + "mem": { + "version": "4.3.0" + } } }, "os-name": { @@ -13628,16 +13226,14 @@ "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=" + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true }, "p-each-series": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz", - "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", - "dev": true, - "requires": { - "p-reduce": "^1.0.0" - } + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.1.0.tgz", + "integrity": "sha512-ZuRs1miPT4HrjFa+9fRfOFXxGJfORgelKV9f9nNOWw2gl6gVsRaVDOQP0+MI0G0wGKns1Yacsu0GjOFbTK0JFQ==", + "dev": true }, "p-finally": { "version": "1.0.0", @@ -13647,7 +13243,8 @@ "p-is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "dev": true }, "p-limit": { "version": "1.3.0", @@ -13671,12 +13268,6 @@ "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", "dev": true }, - "p-reduce": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-1.0.0.tgz", - "integrity": "sha1-GMKw3ZNqRpClKfgjH1ig/bakffo=", - "dev": true - }, "p-retry": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz", @@ -13785,9 +13376,9 @@ } }, "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", "dev": true }, "parallel-transform": { @@ -13995,12 +13586,12 @@ } }, "pdfmake": { - "version": "0.1.63", - "resolved": "https://registry.npmjs.org/pdfmake/-/pdfmake-0.1.63.tgz", - "integrity": "sha512-TjchyLVDzaEmtaDNUrceNrm0QvNIFERYOeDwHwMUQ1twGy68Uhjd1MKsb9DGAh8SuB8MCWQXB7m4k7cUevLjoA==", + "version": "0.1.65", + "resolved": "https://registry.npmjs.org/pdfmake/-/pdfmake-0.1.65.tgz", + "integrity": "sha512-MgzRyiKSP3IEUH7vm4oj3lpikmk5oCD9kYxiJM6Z2Xf6CP9EcikeSDey2rGd4WVvn79Y0TGqz2+to8FtWP8MrA==", "dev": true, "requires": { - "iconv-lite": "^0.5.0", + "iconv-lite": "^0.5.1", "linebreak": "^1.0.2", "pdfkit": "^0.11.0", "svg-to-pdfkit": "^0.1.8" @@ -14230,9 +13821,9 @@ } }, "postcss-value-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", - "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz", + "integrity": "sha512-N7h4pG+Nnu5BEIzyeaaIYWs0LI5XC40OrRh5L60z0QjFsqGWcHcbkBvpe1WYpcIS9yQ8sOi/vIPt1ejQCrMVrg==", "dev": true }, "prelude-ls": { @@ -14248,77 +13839,237 @@ "dev": true }, "prettier": { - "version": "1.18.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz", - "integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", "dev": true }, "pretty-format": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", - "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "version": "25.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.1.0.tgz", + "integrity": "sha512-46zLRSGLd02Rp+Lhad9zzuNZ+swunitn8zIpfD2B4OPCRLXbM87RJT2aBLBWYOznNUML/2l/ReMyWNC80PJBUQ==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "ansi-regex": "^4.0.0", - "ansi-styles": "^3.2.0", - "react-is": "^16.8.4" + "@jest/types": "^25.1.0", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^16.12.0" }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true + }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } } } }, "pretty-quick": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-1.11.1.tgz", - "integrity": "sha512-kSXCkcETfak7EQXz6WOkCeCqpbC4GIzrN/vaneTGMP/fAtD8NerA9bPhCUqHAks1geo7biZNl5uEMPceeneLuA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-2.0.1.tgz", + "integrity": "sha512-y7bJt77XadjUr+P1uKqZxFWLddvj3SKY6EU4BuQtMxmmEFSMpbN132pUWdSG1g1mtUfO0noBvn7wBf0BVeomHg==", "dev": true, "requires": { - "chalk": "^2.3.0", - "execa": "^0.8.0", - "find-up": "^2.1.0", - "ignore": "^3.3.7", - "mri": "^1.1.0", - "multimatch": "^3.0.0" + "chalk": "^2.4.2", + "execa": "^2.1.0", + "find-up": "^4.1.0", + "ignore": "^5.1.4", + "mri": "^1.1.4", + "multimatch": "^4.0.0" }, "dependencies": { "array-differ": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", + "dev": true + }, + "array-union": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-2.1.0.tgz", - "integrity": "sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w==", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", "dev": true }, + "cross-spawn": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", + "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-2.1.0.tgz", + "integrity": "sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw==", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^3.0.0", + "onetime": "^5.1.0", + "p-finally": "^2.0.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "dev": true + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" } }, "multimatch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-3.0.0.tgz", - "integrity": "sha512-22foS/gqQfANZ3o+W7ST2x25ueHDVNWl/b9OlGcLpy/iKxjCpvcNCM51YCenUi7Mt/jAjjqv8JwZRs8YP5sRjA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", + "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", "dev": true, "requires": { - "array-differ": "^2.0.3", - "array-union": "^1.0.2", - "arrify": "^1.0.1", + "@types/minimatch": "^3.0.3", + "array-differ": "^3.0.0", + "array-union": "^2.1.0", + "arrify": "^2.0.1", "minimatch": "^3.0.4" } + }, + "npm-run-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", + "integrity": "sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "p-finally": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", + "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", + "dev": true + }, + "p-limit": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", + "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } } } }, @@ -14375,13 +14126,13 @@ } }, "prompts": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.3.0.tgz", - "integrity": "sha512-NfbbPPg/74fT7wk2XYQ7hAIp9zJyZp5Fu19iRbORqqy1BhtrkZ0fPafBU+7bmn8ie69DpT0R6QpJIN2oisYjJg==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.3.2.tgz", + "integrity": "sha512-Q06uKs2CkNYVID0VqwfAl9mipo99zkBv/n2JtWY89Yxa3ZabWSrs0e2KTudKVa3peLUvYXMefDqIleLPVUBZMA==", "dev": true, "requires": { "kleur": "^3.0.3", - "sisteransi": "^1.0.3" + "sisteransi": "^1.0.4" } }, "protoduck": { @@ -14394,9 +14145,9 @@ } }, "protractor": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.4.2.tgz", - "integrity": "sha512-zlIj64Cr6IOWP7RwxVeD8O4UskLYPoyIcg0HboWJL9T79F1F0VWtKkGTr/9GN6BKL+/Q/GmM7C9kFVCfDbP5sA==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.4.3.tgz", + "integrity": "sha512-7pMAolv8Ah1yJIqaorDTzACtn3gk7BamVKPTeO5lqIGOrfosjPgXFx/z1dqSI+m5EeZc2GMJHPr5DYlodujDNA==", "dev": true, "requires": { "@types/q": "^0.0.32", @@ -14532,12 +14283,17 @@ "del": "^2.2.0", "glob": "^7.0.3", "ini": "^1.3.4", - "minimist": "^1.2.0", + "minimist": "1.2.5", "q": "^1.4.1", "request": "^2.87.0", "rimraf": "^2.5.2", "semver": "^5.3.0", "xml2js": "^0.4.17" + }, + "dependencies": { + "minimist": { + "version": "1.2.5" + } } } } @@ -14579,12 +14335,6 @@ "universalify": "^0.1.0" } }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -14594,13 +14344,13 @@ } }, "proxy-addr": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", - "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", "dev": true, "requires": { "forwarded": "~0.1.2", - "ipaddr.js": "1.9.0" + "ipaddr.js": "1.9.1" } }, "proxy-middleware": { @@ -14724,8 +14474,13 @@ "dev": true, "requires": { "buffer-equal": "0.0.1", - "minimist": "^1.1.3", + "minimist": "1.2.5", "through2": "^2.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.5" + } } }, "randombytes": { @@ -14783,22 +14538,40 @@ "schema-utils": "^2.0.1" }, "dependencies": { + "ajv": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", + "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true + }, "schema-utils": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.4.tgz", - "integrity": "sha512-VNjcaUxVnEeun6B2fiiUDjXXBtD4ZSH7pdbfIu1pOFwgptDPLMo/z9jr4sUfsjFVPqDCEin/F7IYlq7/E6yDbQ==", + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.5.tgz", + "integrity": "sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ==", "dev": true, "requires": { - "ajv": "^6.10.2", + "ajv": "^6.12.0", "ajv-keywords": "^3.4.1" } } } }, "react-is": { - "version": "16.12.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz", - "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==", + "version": "16.13.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.0.tgz", + "integrity": "sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA==", "dev": true }, "read-cache": { @@ -14853,61 +14626,6 @@ "path-type": "^3.0.0" } }, - "read-pkg-up": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", - "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - } - } - }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -14975,9 +14693,9 @@ "dev": true }, "regenerate-unicode-properties": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz", - "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", "dev": true, "requires": { "regenerate": "^1.4.0" @@ -14990,12 +14708,13 @@ "dev": true }, "regenerator-transform": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz", - "integrity": "sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ==", + "version": "0.14.4", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", + "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==", "dev": true, "requires": { - "private": "^0.1.6" + "@babel/runtime": "^7.8.4", + "private": "^0.1.8" } }, "regex-not": { @@ -15019,17 +14738,17 @@ } }, "regexpu-core": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz", - "integrity": "sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", + "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", "dev": true, "requires": { "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.1.0", - "regjsgen": "^0.5.0", - "regjsparser": "^0.6.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.1.0" + "unicode-match-property-value-ecmascript": "^1.2.0" } }, "regjsgen": { @@ -15039,9 +14758,9 @@ "dev": true }, "regjsparser": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.2.tgz", - "integrity": "sha512-E9ghzUtoLwDekPT0DYCp+c4h+bvuUpe6rRHCTYn6eGoqj1LgKXxT6I0Il4WbjhQkOghzi/V+y03bPKvbllL93Q==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", + "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -15226,9 +14945,9 @@ "dev": true }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", "dev": true, "requires": { "cliui": "^5.0.0", @@ -15240,13 +14959,13 @@ "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "yargs-parser": "^13.1.2" } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -15256,9 +14975,9 @@ } }, "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -15268,7 +14987,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -15278,7 +14997,7 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" } @@ -15290,14 +15009,6 @@ "dev": true, "requires": { "lodash": "^4.17.15" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "request-promise-native": { @@ -15333,9 +15044,9 @@ "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" }, "resolve": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz", - "integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -15445,9 +15156,9 @@ "dev": true }, "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz", + "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==", "dev": true, "requires": { "is-promise": "^2.1.0" @@ -15463,9 +15174,9 @@ } }, "rxjs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", - "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz", + "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==", "requires": { "tslib": "^1.9.0" } @@ -15504,7 +15215,7 @@ "execa": "^1.0.0", "fb-watchman": "^2.0.0", "micromatch": "^3.1.4", - "minimist": "^1.1.1", + "minimist": "1.2.5", "walker": "~1.0.5" }, "dependencies": { @@ -15555,6 +15266,9 @@ "pump": "^3.0.0" } }, + "minimist": { + "version": "1.2.5" + }, "normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", @@ -15638,12 +15352,13 @@ } }, "scope-analyzer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/scope-analyzer/-/scope-analyzer-2.0.5.tgz", - "integrity": "sha512-+U5H0417mnTEstCD5VwOYO7V4vYuSqwqjFap40ythe67bhMFL5C3UgPwyBv7KDJsqUBIKafOD57xMlh1rN7eaw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/scope-analyzer/-/scope-analyzer-2.1.1.tgz", + "integrity": "sha512-azEAihtQ9mEyZGhfgTJy3IbOWEzeOrYbg7NcYEshPKnKd+LZmC3TNd5dmDxbLBsTG/JVWmCp+vDJ03vJjeXMHg==", "dev": true, "requires": { "array-from": "^2.1.1", + "dash-ast": "^1.0.0", "es6-map": "^0.1.5", "es6-set": "^0.1.5", "es6-symbol": "^3.1.1", @@ -15949,7 +15664,8 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", - "dev": true + "dev": true, + "optional": true }, "signal-exit": { "version": "3.0.2", @@ -15979,9 +15695,9 @@ } }, "sisteransi": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.4.tgz", - "integrity": "sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", "dev": true }, "slash": { @@ -16333,9 +16049,9 @@ }, "dependencies": { "readable-stream": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.5.0.tgz", - "integrity": "sha512-gSz026xs2LfxBPudDuI41V1lka8cxg64E66SGe78zJlsUofOg/yqwezdIcdfwik6B4h8LFmWPA9ef9X3FiNFLA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -16411,18 +16127,18 @@ "dev": true }, "static-eval": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.3.tgz", - "integrity": "sha512-zsxDGucfAh8T339sSKgpFbvg15Fms2IVaJGC+jqp0bVsxhcpM+iMeAI8weNo8dmf4OblgifTBUoyk1vGVtYw2w==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.5.tgz", + "integrity": "sha512-nNbV6LbGtMBgv7e9LFkt5JV8RVlRsyJrphfAt9tOtBBW/SfnzZDf2KnS72an8e434A+9e/BmJuTxeGPvrAK7KA==", "dev": true, "requires": { "escodegen": "^1.11.1" }, "dependencies": { "escodegen": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.13.0.tgz", - "integrity": "sha512-eYk2dCkxR07DsHA/X2hRBj0CFAZeri/LyDMc0C8JT1Hqi6JnVpMhJ7XFITbb0+yZS3lVkaPL2oCkZ3AVmeVbMw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.1.tgz", + "integrity": "sha512-Bmt7NcRySdIfNPfU2ZoXDrrXsG9ZjvDxcAlMfDUgRBjLOWTuIACXPBFJH7Z+cLb40JeQco5toikyc9t9P8E9SQ==", "dev": true, "requires": { "esprima": "^4.0.1", @@ -16583,28 +16299,28 @@ "dev": true }, "string-length": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", - "integrity": "sha1-1A27aGo6zpYMHP/KVivyxF+DY+0=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-3.1.0.tgz", + "integrity": "sha512-Ttp5YvkGm5v9Ijagtaz1BnN+k9ObpvS0eIBblPMp2YWL8FBmi9qblQ9fexc2k/CXFgrTIteU3jAw3payCnwSTA==", "dev": true, "requires": { "astral-regex": "^1.0.0", - "strip-ansi": "^4.0.0" + "strip-ansi": "^5.2.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" } } } @@ -16686,9 +16402,9 @@ } }, "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true }, "strip-eof": { @@ -16696,6 +16412,12 @@ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, "style-loader": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.0.0.tgz", @@ -16706,13 +16428,31 @@ "schema-utils": "^2.0.1" }, "dependencies": { + "ajv": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", + "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true + }, "schema-utils": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.4.tgz", - "integrity": "sha512-VNjcaUxVnEeun6B2fiiUDjXXBtD4ZSH7pdbfIu1pOFwgptDPLMo/z9jr4sUfsjFVPqDCEin/F7IYlq7/E6yDbQ==", + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.5.tgz", + "integrity": "sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ==", "dev": true, "requires": { - "ajv": "^6.10.2", + "ajv": "^6.12.0", "ajv-keywords": "^3.4.1" } } @@ -16777,6 +16517,33 @@ "has-flag": "^3.0.0" } }, + "supports-hyperlinks": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz", + "integrity": "sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==", + "dev": true, + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "svg-to-pdfkit": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/svg-to-pdfkit/-/svg-to-pdfkit-0.1.8.tgz", @@ -16832,10 +16599,20 @@ } } }, + "terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + } + }, "terser": { - "version": "4.3.9", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.3.9.tgz", - "integrity": "sha512-NFGMpHjlzmyOtPL+fDw3G7+6Ueh/sz4mkaUYa4lJCxOPTNzd0Uj0aZJOmsDYoSQyfuVoWDMSWTPU3huyOm2zdA==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.3.tgz", + "integrity": "sha512-Lw+ieAXmY69d09IIc/yqeBqXpEQIpDGZqT34ui1QWXIUpR2RjbqEkT8X7Lgex19hslSqcWM5iMN2kM11eMsESQ==", "dev": true, "requires": { "commander": "^2.20.0", @@ -16888,15 +16665,14 @@ } }, "test-exclude": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", - "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, "requires": { - "glob": "^7.1.3", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^2.0.0" + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" }, "dependencies": { "glob": { @@ -16912,19 +16688,13 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" } - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true } } }, "throat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", - "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", + "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", "dev": true }, "through": { @@ -17045,19 +16815,19 @@ "dev": true }, "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dev": true, "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" + "psl": "^1.1.28", + "punycode": "^2.1.1" }, "dependencies": { "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true } } @@ -17086,11 +16856,16 @@ "dev": true, "requires": { "colors": "^1.0.3", - "minimist": "^1.2.0", + "minimist": "1.2.5", "prompts": "^2.0.4", "request": "^2.88.0", "request-promise-native": "^1.0.7", "xliff": "^4.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.5" + } } }, "traverse": { @@ -17106,9 +16881,9 @@ "dev": true }, "ts-jest": { - "version": "24.3.0", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-24.3.0.tgz", - "integrity": "sha512-Hb94C/+QRIgjVZlJyiWwouYUF+siNJHJHknyspaOcZ+OQAIdFG/UrdQVXw/0B8Z3No34xkUXZJpOTy9alOWdVQ==", + "version": "25.2.1", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-25.2.1.tgz", + "integrity": "sha512-TnntkEEjuXq/Gxpw7xToarmHbAafgCaAzOpnajnFC6jI7oo1trMzAHA04eWpc3MhV6+yvhE8uUBAmN+teRJh0A==", "dev": true, "requires": { "bs-logger": "0.x", @@ -17120,16 +16895,27 @@ "mkdirp": "0.x", "resolve": "1.x", "semver": "^5.5", - "yargs-parser": "10.x" + "yargs-parser": "^16.1.0" }, "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, "json5": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", - "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.2.tgz", + "integrity": "sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ==", "dev": true, "requires": { - "minimist": "^1.2.0" + "minimist": "1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5" + } } }, "semver": { @@ -17139,12 +16925,13 @@ "dev": true }, "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-16.1.0.tgz", + "integrity": "sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg==", "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } @@ -17309,10 +17096,16 @@ "prelude-ls": "~1.1.2" } }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", "dev": true }, "type-is": { @@ -17331,6 +17124,15 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, "typescript": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", @@ -17338,9 +17140,9 @@ "dev": true }, "uglify-js": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.5.tgz", - "integrity": "sha512-GFZ3EXRptKGvb/C1Sq6nO1iI7AGcjyqmIyOw0DrD0675e+NNbGO72xmMM2iEBdFbxaTLo70NbjM/Wy54uZIlsg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.8.0.tgz", + "integrity": "sha512-ugNSTT8ierCsDHso2jkBHXYrU8Y5/fY2ZUprfrJUiD7YpuFvV4jODLFmb3h4btQjqr5Nh4TX4XtgDfCU1WdioQ==", "dev": true, "optional": true, "requires": { @@ -17380,9 +17182,9 @@ } }, "unicode-match-property-value-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", - "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", "dev": true }, "unicode-properties": { @@ -17414,9 +17216,9 @@ } }, "unicode-property-aliases-ecmascript": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", - "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", "dev": true }, "unicode-trie": { @@ -17657,6 +17459,17 @@ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true }, + "v8-to-istanbul": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-4.1.2.tgz", + "integrity": "sha512-G9R+Hpw0ITAmPSr47lSlc5A1uekSYzXxTMlFxso2xoffwo4jQnzbv1p9yXIinO8UMZKfAFewaCHwWvnH4Jb4Ug==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + } + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -17712,12 +17525,12 @@ "dev": true }, "w3c-hr-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", - "integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "dev": true, "requires": { - "browser-process-hrtime": "^0.1.2" + "browser-process-hrtime": "^1.0.0" } }, "w3c-xmlserializer": { @@ -17805,7 +17618,7 @@ "anymatch": "^2.0.0", "async-each": "^1.0.1", "braces": "^2.3.2", - "fsevents": "^1.2.7", + "fsevents": "2.1.2", "glob-parent": "^3.1.0", "inherits": "^2.0.3", "is-binary-path": "^1.0.0", @@ -17817,562 +17630,7 @@ }, "dependencies": { "fsevents": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", - "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1", - "node-pre-gyp": "*" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "3.2.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.9.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.14.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.1", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.13", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.1.1", - "bundled": true, - "dev": true, - "optional": true - } - } + "version": "2.1.2" } } }, @@ -18398,28 +17656,34 @@ } }, "fsevents": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", - "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "dev": true, + "optional": true, + "requires": { + "node-pre-gyp": "*" + }, "dependencies": { "abbrev": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", "bundled": true, + "dev": true, "optional": true }, "aproba": { "version": "1.2.0", "bundled": true, + "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", "bundled": true, + "dev": true, "optional": true, "requires": { "delegates": "^1.0.0", @@ -18429,11 +17693,13 @@ "balanced-match": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "dev": true, "optional": true, "requires": { "balanced-match": "^1.0.0", @@ -18443,31 +17709,37 @@ "chownr": { "version": "1.1.3", "bundled": true, + "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", "bundled": true, + "dev": true, "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, + "dev": true, "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, + "dev": true, "optional": true }, "core-util-is": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "debug": { "version": "3.2.6", "bundled": true, + "dev": true, "optional": true, "requires": { "ms": "^2.1.1" @@ -18476,21 +17748,25 @@ "deep-extend": { "version": "0.6.0", "bundled": true, + "dev": true, "optional": true }, "delegates": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", "bundled": true, + "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.7", "bundled": true, + "dev": true, "optional": true, "requires": { "minipass": "^2.6.0" @@ -18499,11 +17775,13 @@ "fs.realpath": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "gauge": { "version": "2.7.4", "bundled": true, + "dev": true, "optional": true, "requires": { "aproba": "^1.0.3", @@ -18519,6 +17797,7 @@ "glob": { "version": "7.1.6", "bundled": true, + "dev": true, "optional": true, "requires": { "fs.realpath": "^1.0.0", @@ -18532,11 +17811,13 @@ "has-unicode": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.24", "bundled": true, + "dev": true, "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -18545,6 +17826,7 @@ "ignore-walk": { "version": "3.0.3", "bundled": true, + "dev": true, "optional": true, "requires": { "minimatch": "^3.0.4" @@ -18553,6 +17835,7 @@ "inflight": { "version": "1.0.6", "bundled": true, + "dev": true, "optional": true, "requires": { "once": "^1.3.0", @@ -18562,16 +17845,19 @@ "inherits": { "version": "2.0.4", "bundled": true, + "dev": true, "optional": true }, "ini": { "version": "1.3.5", "bundled": true, + "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true, "requires": { "number-is-nan": "^1.0.0" @@ -18580,24 +17866,27 @@ "isarray": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", "bundled": true, + "dev": true, "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "0.0.8", - "bundled": true, - "optional": true + "dev": true, + "optional": true, + "version": "1.2.5" }, "minipass": { "version": "2.9.0", "bundled": true, + "dev": true, "optional": true, "requires": { "safe-buffer": "^5.1.2", @@ -18607,6 +17896,7 @@ "minizlib": { "version": "1.3.3", "bundled": true, + "dev": true, "optional": true, "requires": { "minipass": "^2.9.0" @@ -18615,19 +17905,27 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "dev": true, "optional": true, "requires": { - "minimist": "0.0.8" + "minimist": "1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5" + } } }, "ms": { "version": "2.1.2", "bundled": true, + "dev": true, "optional": true }, "needle": { "version": "2.4.0", "bundled": true, + "dev": true, "optional": true, "requires": { "debug": "^3.2.6", @@ -18638,6 +17936,8 @@ "node-pre-gyp": { "version": "0.14.0", "bundled": true, + "dev": true, + "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", @@ -18654,6 +17954,7 @@ "nopt": { "version": "4.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "abbrev": "1", @@ -18663,6 +17964,7 @@ "npm-bundled": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true, "requires": { "npm-normalize-package-bin": "^1.0.1" @@ -18671,11 +17973,13 @@ "npm-normalize-package-bin": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "npm-packlist": { "version": "1.4.7", "bundled": true, + "dev": true, "optional": true, "requires": { "ignore-walk": "^3.0.1", @@ -18685,6 +17989,7 @@ "npmlog": { "version": "4.1.2", "bundled": true, + "dev": true, "optional": true, "requires": { "are-we-there-yet": "~1.1.2", @@ -18696,16 +18001,19 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", "bundled": true, + "dev": true, "optional": true }, "once": { "version": "1.4.0", "bundled": true, + "dev": true, "optional": true, "requires": { "wrappy": "1" @@ -18714,16 +18022,19 @@ "os-homedir": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "osenv": { "version": "0.1.5", "bundled": true, + "dev": true, "optional": true, "requires": { "os-homedir": "^1.0.0", @@ -18733,34 +18044,36 @@ "path-is-absolute": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "rc": { "version": "1.2.8", "bundled": true, + "dev": true, "optional": true, "requires": { "deep-extend": "^0.6.0", "ini": "~1.3.0", - "minimist": "^1.2.0", + "minimist": "1.2.5", "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { - "version": "1.2.0", - "bundled": true, - "optional": true + "version": "1.2.5" } } }, "readable-stream": { "version": "2.3.6", "bundled": true, + "dev": true, "optional": true, "requires": { "core-util-is": "~1.0.0", @@ -18775,6 +18088,7 @@ "rimraf": { "version": "2.7.1", "bundled": true, + "dev": true, "optional": true, "requires": { "glob": "^7.1.3" @@ -18783,36 +18097,43 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, + "dev": true, "optional": true }, "safer-buffer": { "version": "2.1.2", "bundled": true, + "dev": true, "optional": true }, "sax": { "version": "1.2.4", "bundled": true, + "dev": true, "optional": true }, "semver": { "version": "5.7.1", "bundled": true, + "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", "bundled": true, + "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", "bundled": true, + "dev": true, "optional": true }, "string-width": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true, "requires": { "code-point-at": "^1.0.0", @@ -18823,6 +18144,7 @@ "string_decoder": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true, "requires": { "safe-buffer": "~5.1.0" @@ -18831,6 +18153,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "ansi-regex": "^2.0.0" @@ -18839,11 +18162,13 @@ "strip-json-comments": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "tar": { "version": "4.4.13", "bundled": true, + "dev": true, "optional": true, "requires": { "chownr": "^1.1.1", @@ -18858,11 +18183,13 @@ "util-deprecate": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "wide-align": { "version": "1.1.3", "bundled": true, + "dev": true, "optional": true, "requires": { "string-width": "^1.0.2 || 2" @@ -18871,14 +18198,17 @@ "wrappy": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "yallist": { "version": "3.1.1", "bundled": true, + "dev": true, "optional": true } - } + }, + "version": "2.1.2" }, "is-binary-path": { "version": "1.0.1", @@ -19141,7 +18471,7 @@ "anymatch": "^2.0.0", "async-each": "^1.0.1", "braces": "^2.3.2", - "fsevents": "^1.2.7", + "fsevents": "2.1.2", "glob-parent": "^3.1.0", "inherits": "^2.0.3", "is-binary-path": "^1.0.0", @@ -19153,562 +18483,7 @@ }, "dependencies": { "fsevents": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", - "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1", - "node-pre-gyp": "*" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "3.2.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.9.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.14.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.1", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.13", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.1.1", - "bundled": true, - "dev": true, - "optional": true - } - } + "version": "2.1.2" } } }, @@ -19801,28 +18576,34 @@ } }, "fsevents": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", - "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "dev": true, + "optional": true, + "requires": { + "node-pre-gyp": "*" + }, "dependencies": { "abbrev": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", "bundled": true, + "dev": true, "optional": true }, "aproba": { "version": "1.2.0", "bundled": true, + "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", "bundled": true, + "dev": true, "optional": true, "requires": { "delegates": "^1.0.0", @@ -19832,11 +18613,13 @@ "balanced-match": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "dev": true, "optional": true, "requires": { "balanced-match": "^1.0.0", @@ -19846,31 +18629,37 @@ "chownr": { "version": "1.1.3", "bundled": true, + "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", "bundled": true, + "dev": true, "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, + "dev": true, "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, + "dev": true, "optional": true }, "core-util-is": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "debug": { "version": "3.2.6", "bundled": true, + "dev": true, "optional": true, "requires": { "ms": "^2.1.1" @@ -19879,21 +18668,25 @@ "deep-extend": { "version": "0.6.0", "bundled": true, + "dev": true, "optional": true }, "delegates": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", "bundled": true, + "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.7", "bundled": true, + "dev": true, "optional": true, "requires": { "minipass": "^2.6.0" @@ -19902,11 +18695,13 @@ "fs.realpath": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "gauge": { "version": "2.7.4", "bundled": true, + "dev": true, "optional": true, "requires": { "aproba": "^1.0.3", @@ -19922,6 +18717,7 @@ "glob": { "version": "7.1.6", "bundled": true, + "dev": true, "optional": true, "requires": { "fs.realpath": "^1.0.0", @@ -19935,11 +18731,13 @@ "has-unicode": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.24", "bundled": true, + "dev": true, "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -19948,6 +18746,7 @@ "ignore-walk": { "version": "3.0.3", "bundled": true, + "dev": true, "optional": true, "requires": { "minimatch": "^3.0.4" @@ -19956,6 +18755,7 @@ "inflight": { "version": "1.0.6", "bundled": true, + "dev": true, "optional": true, "requires": { "once": "^1.3.0", @@ -19965,16 +18765,19 @@ "inherits": { "version": "2.0.4", "bundled": true, + "dev": true, "optional": true }, "ini": { "version": "1.3.5", "bundled": true, + "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true, "requires": { "number-is-nan": "^1.0.0" @@ -19983,24 +18786,27 @@ "isarray": { "version": "1.0.0", "bundled": true, + "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", "bundled": true, + "dev": true, "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "0.0.8", - "bundled": true, - "optional": true + "dev": true, + "optional": true, + "version": "1.2.5" }, "minipass": { "version": "2.9.0", "bundled": true, + "dev": true, "optional": true, "requires": { "safe-buffer": "^5.1.2", @@ -20010,6 +18816,7 @@ "minizlib": { "version": "1.3.3", "bundled": true, + "dev": true, "optional": true, "requires": { "minipass": "^2.9.0" @@ -20018,19 +18825,27 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "dev": true, "optional": true, "requires": { - "minimist": "0.0.8" + "minimist": "1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5" + } } }, "ms": { "version": "2.1.2", "bundled": true, + "dev": true, "optional": true }, "needle": { "version": "2.4.0", "bundled": true, + "dev": true, "optional": true, "requires": { "debug": "^3.2.6", @@ -20041,6 +18856,8 @@ "node-pre-gyp": { "version": "0.14.0", "bundled": true, + "dev": true, + "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", @@ -20057,6 +18874,7 @@ "nopt": { "version": "4.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "abbrev": "1", @@ -20066,6 +18884,7 @@ "npm-bundled": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true, "requires": { "npm-normalize-package-bin": "^1.0.1" @@ -20074,11 +18893,13 @@ "npm-normalize-package-bin": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "npm-packlist": { "version": "1.4.7", "bundled": true, + "dev": true, "optional": true, "requires": { "ignore-walk": "^3.0.1", @@ -20088,6 +18909,7 @@ "npmlog": { "version": "4.1.2", "bundled": true, + "dev": true, "optional": true, "requires": { "are-we-there-yet": "~1.1.2", @@ -20099,16 +18921,19 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", "bundled": true, + "dev": true, "optional": true }, "once": { "version": "1.4.0", "bundled": true, + "dev": true, "optional": true, "requires": { "wrappy": "1" @@ -20117,16 +18942,19 @@ "os-homedir": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "osenv": { "version": "0.1.5", "bundled": true, + "dev": true, "optional": true, "requires": { "os-homedir": "^1.0.0", @@ -20136,34 +18964,36 @@ "path-is-absolute": { "version": "1.0.1", "bundled": true, + "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "rc": { "version": "1.2.8", "bundled": true, + "dev": true, "optional": true, "requires": { "deep-extend": "^0.6.0", "ini": "~1.3.0", - "minimist": "^1.2.0", + "minimist": "1.2.5", "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { - "version": "1.2.0", - "bundled": true, - "optional": true + "version": "1.2.5" } } }, "readable-stream": { "version": "2.3.6", "bundled": true, + "dev": true, "optional": true, "requires": { "core-util-is": "~1.0.0", @@ -20178,6 +19008,7 @@ "rimraf": { "version": "2.7.1", "bundled": true, + "dev": true, "optional": true, "requires": { "glob": "^7.1.3" @@ -20186,36 +19017,43 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, + "dev": true, "optional": true }, "safer-buffer": { "version": "2.1.2", "bundled": true, + "dev": true, "optional": true }, "sax": { "version": "1.2.4", "bundled": true, + "dev": true, "optional": true }, "semver": { "version": "5.7.1", "bundled": true, + "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", "bundled": true, + "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", "bundled": true, + "dev": true, "optional": true }, "string-width": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true, "requires": { "code-point-at": "^1.0.0", @@ -20226,6 +19064,7 @@ "string_decoder": { "version": "1.1.1", "bundled": true, + "dev": true, "optional": true, "requires": { "safe-buffer": "~5.1.0" @@ -20234,6 +19073,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "dev": true, "optional": true, "requires": { "ansi-regex": "^2.0.0" @@ -20242,11 +19082,13 @@ "strip-json-comments": { "version": "2.0.1", "bundled": true, + "dev": true, "optional": true }, "tar": { "version": "4.4.13", "bundled": true, + "dev": true, "optional": true, "requires": { "chownr": "^1.1.1", @@ -20261,11 +19103,13 @@ "util-deprecate": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "wide-align": { "version": "1.1.3", "bundled": true, + "dev": true, "optional": true, "requires": { "string-width": "^1.0.2 || 2" @@ -20274,14 +19118,17 @@ "wrappy": { "version": "1.0.2", "bundled": true, + "dev": true, "optional": true }, "yallist": { "version": "3.1.1", "bundled": true, + "dev": true, "optional": true } - } + }, + "version": "2.1.2" }, "get-stream": { "version": "4.1.0", @@ -20345,19 +19192,19 @@ } }, "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "dev": true, "requires": { "map-age-cleaner": "^0.1.1", "mimic-fn": "^2.0.0", "p-is-promise": "^2.0.0" - } + }, + "version": "4.3.0" }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true }, "os-locale": { "version": "3.1.0", @@ -20367,19 +19214,11 @@ "requires": { "execa": "^1.0.0", "lcid": "^2.0.0", - "mem": "^4.0.0" + "mem": "4.3.0" }, "dependencies": { "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } + "version": "4.3.0" } } }, @@ -20486,14 +19325,6 @@ "dev": true, "requires": { "lodash": "^4.17.5" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - } } }, "webpack-sources": { @@ -20556,9 +19387,9 @@ "dev": true }, "whatwg-url": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", - "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", "dev": true, "requires": { "lodash.sortby": "^4.7.0", @@ -20696,14 +19527,15 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write-file-atomic": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.1.tgz", - "integrity": "sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" } }, "ws": { @@ -20832,4 +19664,4 @@ "integrity": "sha512-GkPiJL8jifSrKReKaTZ5jkhrMEgXbXYC+IPo1iquBjayRa0q86w3Dipjn8b415jpitMExe9lV8iTsv8tk3DGag==" } } -} +}
\ No newline at end of file diff --git a/src/pybind/mgr/dashboard/frontend/package.json b/src/pybind/mgr/dashboard/frontend/package.json index 7890e356020..bf00c0e895e 100644 --- a/src/pybind/mgr/dashboard/frontend/package.json +++ b/src/pybind/mgr/dashboard/frontend/package.json @@ -104,21 +104,21 @@ "ng2-charts": "2.3.0", "ngx-bootstrap": "5.1.2", "ngx-toastr": "11.0.0", - "rxjs": "6.5.3", + "rxjs": "6.5.4", "simplebar-angular": "2.0.1", "swagger-ui-dist": "3.23.11", "tslib": "1.10.0", "zone.js": "0.9.1" }, "devDependencies": { - "@angular-devkit/build-angular": "0.803.23", - "@angular/cli": "8.3.23", + "@angular-devkit/build-angular": "0.803.25", + "@angular/cli": "8.3.25", "@angular/compiler-cli": "8.2.14", "@angular/language-service": "8.2.14", "@compodoc/compodoc": "1.1.11", - "@types/jasmine": "3.4.0", - "@types/jasminewd2": "2.0.6", - "@types/jest": "24.0.23", + "@types/jasmine": "3.5.9", + "@types/jasminewd2": "2.0.8", + "@types/jest": "25.1.4", "@types/lodash": "4.14.141", "@types/node": "12.7.8", "@types/simplebar": "2.4.2", @@ -127,17 +127,17 @@ "htmllint-cli": "0.0.7", "jasmine-core": "3.5.0", "jasmine-spec-reporter": "4.2.1", - "jest": "24.9.0", + "jest": "25.1.0", "jest-canvas-mock": "2.2.0", - "jest-preset-angular": "8.0.0", - "jest-silent-reporter": "0.1.2", - "ng-bullet": "^1.0.3", - "ng-mocks": "^9.0.0", + "jest-preset-angular": "8.1.2", + "jest-silent-reporter": "0.2.1", + "ng-bullet": "1.0.3", + "ng-mocks": "9.0.0", "npm-force-resolutions": "0.0.3", "npm-run-all": "4.1.5", - "prettier": "1.18.2", - "pretty-quick": "1.11.1", - "protractor": "5.4.2", + "prettier": "1.19.1", + "pretty-quick": "2.0.1", + "protractor": "5.4.3", "protractor-fail-fast": "3.1.0", "protractor-screenshoter-plugin": "0.10.3", "replace-in-file": "4.1.3", @@ -147,8 +147,8 @@ "typescript": "3.5.3" }, "resolutions": { - "lodash": "4.17.15", "mem": "4.3.0", + "minimist": "1.2.5", "fsevents": "2.1.2" } } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-discovery-modal/iscsi-target-discovery-modal.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-discovery-modal/iscsi-target-discovery-modal.component.html index 3562530be92..8ebdb7d6e06 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-discovery-modal/iscsi-target-discovery-modal.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-discovery-modal/iscsi-target-discovery-modal.component.html @@ -24,8 +24,8 @@ <span class="invalid-feedback" *ngIf="discoveryForm.showError('user', formDir, 'pattern')" - i18n>Usernames must have a length of 8 to 64 characters and - can only contain letters, '.', '@', '-', '_' or ':'.</span> + i18n>User names must have a length of 8 to 64 characters and can contain + alphanumeric characters, '.', '@', '-', '_' or ':'.</span> </div> </div> @@ -58,8 +58,8 @@ <span class="invalid-feedback" *ngIf="discoveryForm.showError('password', formDir, 'pattern')" - i18n>Passwords must have a length of 12 to 16 characters - and can only contain letters, '@', '-', '_' or '/'.</span> + i18n>Passwords must have a length of 12 to 16 characters and can contain + alphanumeric characters, '@', '-', '_' or '/'.</span> </div> </div> @@ -81,8 +81,8 @@ <span class="invalid-feedback" *ngIf="discoveryForm.showError('mutual_user', formDir, 'pattern')" - i18n>Usernames must have a length of 8 to 64 characters and - can only contain letters, '.', '@', '-', '_' or ':'.</span> + i18n>User names must have a length of 8 to 64 characters and can contain + alphanumeric characters, '.', '@', '-', '_' or ':'.</span> </div> </div> @@ -115,8 +115,8 @@ <span class="invalid-feedback" *ngIf="discoveryForm.showError('mutual_password', formDir, 'pattern')" - i18n>Passwords must have a length of 12 to 16 characters and - can only contain letters, '@', '-', '_' or '/'.</span> + i18n>Passwords must have a length of 12 to 16 characters and can contain + alphanumeric characters, '@', '-', '_' or '/'.</span> </div> </div> </div> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.html index 899742549e6..fea6d30f18e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi-target-form/iscsi-target-form.component.html @@ -223,8 +223,8 @@ <span class="invalid-feedback" *ngIf="targetForm.showError('user', formDir, 'pattern')" - i18n>Usernames must have a length of 8 to 64 characters and - can only contain letters, '.', '@', '-', '_' or ':'.</span> + i18n>User names must have a length of 8 to 64 characters and can contain + alphanumeric characters, '.', '@', '-', '_' or ':'.</span> </div> </div> @@ -260,8 +260,8 @@ <span class="invalid-feedback" *ngIf="targetForm.showError('password', formDir, 'pattern')" - i18n>Passwords must have a length of 12 to 16 characters - and can only contain letters, '@', '-', '_' or '/'.</span> + i18n>Passwords must have a length of 12 to 16 characters and can contain + alphanumeric characters, '@', '-', '_' or '/'.</span> </div> </div> @@ -284,8 +284,8 @@ <span class="invalid-feedback" *ngIf="targetForm.showError('mutual_user', formDir, 'pattern')" - i18n>Usernames must have a length of 8 to 64 characters and - can only contain letters, '.', '@', '-', '_' or ':'.</span> + i18n>User names must have a length of 8 to 64 characters and can contain + alphanumeric characters, '.', '@', '-', '_' or ':'.</span> </div> </div> @@ -322,8 +322,8 @@ <span class="invalid-feedback" *ngIf="targetForm.showError('mutual_password', formDir, 'pattern')" - i18n>Passwords must have a length of 12 to 16 characters - and can only contain letters, '@', '-', '_' or '/'.</span> + i18n>Passwords must have a length of 12 to 16 characters and can contain + alphanumeric characters, '@', '-', '_' or '/'.</span> </div> </div> @@ -392,8 +392,8 @@ <span class="invalid-feedback" *ngIf="initiator.showError('user', formDir, 'pattern')" - i18n>Usernames must have a length of 8 to 64 characters and - can only contain letters, '.', '@', '-', '_' or ':'.</span> + i18n>User names must have a length of 8 to 64 characters and can contain + alphanumeric characters, '.', '@', '-', '_' or ':'.</span> </div> </div> @@ -426,8 +426,8 @@ <span class="invalid-feedback" *ngIf="initiator.showError('password', formDir, 'pattern')" - i18n>Passwords must have a length of 12 to 16 characters - and can only contain letters, '@', '-', '_' or '/'.</span> + i18n>Passwords must have a length of 12 to 16 characters and can contain + alphanumeric characters, '@', '-', '_' or '/'.</span> </div> </div> @@ -450,8 +450,8 @@ <span class="invalid-feedback" *ngIf="initiator.showError('mutual_user', formDir, 'pattern')" - i18n>Usernames must have a length of 8 to 64 characters and - can only contain letters, '.', '@', '-', '_' or ':'.</span> + i18n>User names must have a length of 8 to 64 characters and can contain + alphanumeric characters, '.', '@', '-', '_' or ':'.</span> </div> </div> @@ -484,8 +484,8 @@ <span class="invalid-feedback" *ngIf="initiator.showError('mutual_password', formDir, 'pattern')" - i18n>Passwords must have a length of 12 to 16 characters and - can only contain letters, '@', '-', '_' or '/'.</span> + i18n>Passwords must have a length of 12 to 16 characters and can contain + alphanumeric characters, '@', '-', '_' or '/'.</span> </div> </div> </ng-container> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi/iscsi.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi/iscsi.component.spec.ts index f599c7f00a9..fc41d5e4042 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi/iscsi.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/iscsi/iscsi.component.spec.ts @@ -66,8 +66,16 @@ describe('IscsiComponent', () => { it('should refresh with stats', () => { tcmuiscsiData.images.push({ stats_history: { - rd_bytes: [[1540551220, 0.0], [1540551225, 0.0], [1540551230, 0.0]], - wr_bytes: [[1540551220, 0.0], [1540551225, 0.0], [1540551230, 0.0]] + rd_bytes: [ + [1540551220, 0.0], + [1540551225, 0.0], + [1540551230, 0.0] + ], + wr_bytes: [ + [1540551220, 0.0], + [1540551225, 0.0], + [1540551230, 0.0] + ] } }); component.refresh(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts index 4e4936171ca..ea95a5540a6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts @@ -113,7 +113,7 @@ describe('RbdSnapshotListComponent', () => { }; }); - it('should call stopLoadingSpinner if the request fails', <any>fakeAsync(() => { + it('should call stopLoadingSpinner if the request fails', fakeAsync(() => { expect(called).toBe(false); component._asyncTask('deleteSnapshot', 'rbd/snap/delete', 'someName'); tick(500); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-chart/cephfs-chart.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-chart/cephfs-chart.component.spec.ts index 71cc4c4a6c1..9c8e4f95b65 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-chart/cephfs-chart.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-chart/cephfs-chart.component.spec.ts @@ -9,7 +9,12 @@ describe('CephfsChartComponent', () => { let component: CephfsChartComponent; let fixture: ComponentFixture<CephfsChartComponent>; - const counter = [[0, 15], [5, 15], [10, 25], [15, 50]]; + const counter = [ + [0, 15], + [5, 15], + [10, 25], + [15, 50] + ]; configureTestBed({ imports: [ChartsModule], diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.spec.ts index 0cdcdb4496b..f92a6147585 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.spec.ts @@ -434,8 +434,14 @@ describe('CephfsDirectoriesComponent', () => { it('tests dir mock', () => { const path = '/a/b/c'; - mockData.createdSnaps = [{ path, name: 's1' }, { path, name: 's2' }]; - mockData.deletedSnaps = [{ path, name: 'someSnapshot2' }, { path, name: 's2' }]; + mockData.createdSnaps = [ + { path, name: 's1' }, + { path, name: 's2' } + ]; + mockData.deletedSnaps = [ + { path, name: 'someSnapshot2' }, + { path, name: 's2' } + ]; const dir = mockLib.dir('/a/b', 'c', 2); expect(dir.path).toBe('/a/b/c'); expect(dir.parent).toBe('/a/b'); @@ -623,28 +629,48 @@ describe('CephfsDirectoriesComponent', () => { describe('used quotas', () => { it('should use no quota if none is set', () => { - mockLib.setFourQuotaDirs([[0, 0], [0, 0], [0, 0], [0, 0]]); + mockLib.setFourQuotaDirs([ + [0, 0], + [0, 0], + [0, 0], + [0, 0] + ]); assert.noQuota('files'); assert.noQuota('bytes'); assert.dirQuotas(0, 0); }); it('should use quota from upper parents', () => { - mockLib.setFourQuotaDirs([[100, 0], [0, 8], [0, 0], [0, 0]]); + mockLib.setFourQuotaDirs([ + [100, 0], + [0, 8], + [0, 0], + [0, 0] + ]); assert.quotaIsInherited('files', 100, '/1'); assert.quotaIsInherited('bytes', '8 KiB', '/1/2'); assert.dirQuotas(0, 0); }); it('should use quota from the parent with the lowest value (deep inheritance)', () => { - mockLib.setFourQuotaDirs([[200, 1], [100, 4], [400, 3], [300, 2]]); + mockLib.setFourQuotaDirs([ + [200, 1], + [100, 4], + [400, 3], + [300, 2] + ]); assert.quotaIsInherited('files', 100, '/1/2'); assert.quotaIsInherited('bytes', '1 KiB', '/1'); assert.dirQuotas(2048, 300); }); it('should use current value', () => { - mockLib.setFourQuotaDirs([[200, 2], [300, 4], [400, 3], [100, 1]]); + mockLib.setFourQuotaDirs([ + [200, 2], + [300, 4], + [400, 3], + [100, 1] + ]); assert.quotaIsNotInherited('files', 100, 200); assert.quotaIsNotInherited('bytes', '1 KiB', 2048); assert.dirQuotas(1024, 100); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.spec.ts index b7ade11d31d..029266474d2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/monitor/monitor.component.spec.ts @@ -29,13 +29,31 @@ describe('MonitorComponent', () => { stats: { num_sessions: [[1, 5]] } }, { - stats: { num_sessions: [[1, 1], [2, 10], [3, 1]] } + stats: { + num_sessions: [ + [1, 1], + [2, 10], + [3, 1] + ] + } }, { - stats: { num_sessions: [[1, 0], [2, 3]] } + stats: { + num_sessions: [ + [1, 0], + [2, 3] + ] + } }, { - stats: { num_sessions: [[1, 2], [2, 1], [3, 7], [4, 5]] } + stats: { + num_sessions: [ + [1, 2], + [2, 1], + [3, 7], + [4, 5] + ] + } } ], mon_status: null, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.ts index 60b374c0070..12520e41b4e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-flags-modal/osd-flags-modal.component.ts @@ -76,6 +76,12 @@ export class OsdFlagsModalComponent implements OnInit { value: false, description: this.i18n('Backfilling of PGs is suspended') }, + norebalance: { + code: 'norebalance', + name: this.i18n('No Rebalance'), + value: false, + description: this.i18n('OSD will choose not to backfill unless PG is also degraded') + }, norecover: { code: 'norecover', name: this.i18n('No Recover'), diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts index 501943515e1..bba92939450 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts @@ -140,8 +140,14 @@ describe('OsdListComponent', () => { device_class: 'ssd' }, stats_history: { - op_out_bytes: [[n, n], [n * 2, n * 2]], - op_in_bytes: [[n * 3, n * 3], [n * 4, n * 4]] + op_out_bytes: [ + [n, n], + [n * 2, n * 2] + ], + op_in_bytes: [ + [n * 3, n * 3], + [n * 4, n * 4] + ] }, stats: { stat_bytes_used: n * n, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.html index 8fe797e28c3..84ce11fb23c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.html @@ -98,11 +98,12 @@ <cd-info-card cardTitle="Metadata Servers" i18n-cardTitle class="cd-status-card" - *ngIf="(enabledFeature.cephfs && healthData.fs_map | mdsSummary) as transformedResult" + *ngIf="((enabledFeature.cephfs && healthData.fs_map) | mdsSummary) as transformedResult" [contentClass]="(transformedResult.length > 1 ? 'text-area-size-2' : '') + ' content-highlight'"> <!-- TODO: check text-area-size-2 --> <span *ngFor="let result of transformedResult" - [ngClass]="result.class"> + [ngClass]="result.class" + [title]="result.titleText != null ? result.titleText : ''"> {{ result.content }} </span> </cd-info-card> diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.scss index efeb7c56fe6..9c7684a5c6f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.scss +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.scss @@ -39,7 +39,7 @@ cd-info-card { white-space: pre; } -.mgr-active-name:hover { +.popover-info:hover { cursor: pointer; } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts index 17bc30b9f6a..50a96ee6b51 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts @@ -33,7 +33,7 @@ describe('HealthComponent', () => { mgr_map: { standbys: [] }, hosts: 0, rgw: 0, - fs_map: { filesystems: [] }, + fs_map: { filesystems: [], standbys: [] }, iscsi_daemons: 0, client_perf: {}, scrub_status: 'Inactive', diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.spec.ts index 159438c7776..cc5f9190a91 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.spec.ts @@ -20,13 +20,13 @@ describe('MdsSummaryPipe', () => { it('transforms with 0 active and 2 standy', () => { const payload = { - standbys: [0], + standbys: [{ name: 'a' }], filesystems: [{ mdsmap: { info: [{ state: 'up:standby-replay' }] } }] }; const expected = [ - { class: '', content: '0 active' }, - { class: 'card-text-line-break', content: '' }, - { class: '', content: '2 standby' } + { class: 'popover-info', content: '0 active', titleText: '1 standbyReplay' }, + { class: 'card-text-line-break', content: '', titleText: '' }, + { class: 'popover-info', content: '2 standby', titleText: 'standby daemons: a' } ]; expect(pipe.transform(payload)).toEqual(expected); @@ -34,13 +34,13 @@ describe('MdsSummaryPipe', () => { it('transforms with 1 active and 1 standy', () => { const payload = { - standbys: [0], - filesystems: [{ mdsmap: { info: [{ state: 'up:active' }] } }] + standbys: [{ name: 'b' }], + filesystems: [{ mdsmap: { info: [{ state: 'up:active', name: 'a' }] } }] }; const expected = [ - { class: '', content: '1 active' }, - { class: 'card-text-line-break', content: '' }, - { class: '', content: '1 standby' } + { class: 'popover-info', content: '1 active', titleText: 'active daemon: a' }, + { class: 'card-text-line-break', content: '', titleText: '' }, + { class: 'popover-info', content: '1 standby', titleText: 'standby daemons: b' } ]; expect(pipe.transform(payload)).toEqual(expected); }); @@ -50,17 +50,17 @@ describe('MdsSummaryPipe', () => { standbys: [0], filesystems: [] }; - const expected = [{ class: '', content: 'no filesystems' }]; + const expected = [{ class: 'popover-info', content: 'no filesystems', titleText: '' }]; expect(pipe.transform(payload)).toEqual(expected); }); it('transforms without filesystem', () => { - const payload = { standbys: [0] }; + const payload = { standbys: [{ name: 'a' }] }; const expected = [ - { class: '', content: '1 up' }, - { class: 'card-text-line-break', content: '' }, - { class: '', content: 'no filesystems' } + { class: 'popover-info', content: '1 up', titleText: '' }, + { class: 'card-text-line-break', content: '', titleText: '' }, + { class: 'popover-info', content: 'no filesystems', titleText: 'standby daemons: a' } ]; expect(pipe.transform(payload)).toEqual(expected); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.ts index 5d43e4244e5..7bd1014d8de 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mds-summary.pipe.ts @@ -42,22 +42,39 @@ export class MdsSummaryPipe implements PipeTransform { contentLine1 = `${active} ${this.i18n('active')}`; contentLine2 = `${standbys + standbyReplay} ${this.i18n('standby')}`; } - + const standbyHoverText = value.standbys.map((s: any): string => s.name).join(', '); + const standbyTitleText = !standbyHoverText + ? '' + : `${this.i18n('standby daemons')}: ${standbyHoverText}`; + const fsLength = value.filesystems ? value.filesystems.length : 0; + const infoObject = fsLength > 0 ? value.filesystems[0].mdsmap.info : {}; + const activeHoverText = Object.values(infoObject) + .map((info: any): string => info.name) + .join(', '); + let activeTitleText = !activeHoverText + ? '' + : `${this.i18n('active daemon')}: ${activeHoverText}`; + // There is always one standbyreplay to replace active daemon, if active one is down + if (!active && fsLength > 0) { + activeTitleText = `${standbyReplay} ${this.i18n('standbyReplay')}`; + } const mgrSummary = [ { content: contentLine1, - class: '' + class: 'popover-info', + titleText: activeTitleText } ]; - if (contentLine2) { mgrSummary.push({ content: '', - class: 'card-text-line-break' + class: 'card-text-line-break', + titleText: '' }); mgrSummary.push({ content: contentLine2, - class: '' + class: 'popover-info', + titleText: standbyTitleText }); } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mgr-summary.pipe.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mgr-summary.pipe.spec.ts index ffa58d91876..51e70d4d8ed 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mgr-summary.pipe.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mgr-summary.pipe.spec.ts @@ -29,9 +29,9 @@ describe('MgrSummaryPipe', () => { standbys: [] }; const expected = [ - { class: 'mgr-active-name', content: 'n/a active', titleText: '' }, + { class: 'popover-info', content: 'n/a active', titleText: '' }, { class: 'card-text-line-break', content: '', titleText: '' }, - { class: '', content: '0 standby', titleText: '' } + { class: 'popover-info', content: '0 standby', titleText: '' } ]; expect(pipe.transform(payload)).toEqual(expected); @@ -39,13 +39,13 @@ describe('MgrSummaryPipe', () => { it('transforms with 1 active and 2 standbys', () => { const payload = { - active_name: 'a', - standbys: ['b', 'c'] + active_name: 'x', + standbys: [{ name: 'y' }, { name: 'z' }] }; const expected = [ - { class: 'mgr-active-name', content: '1 active', titleText: 'active daemon: a' }, + { class: 'popover-info', content: '1 active', titleText: 'active daemon: x' }, { class: 'card-text-line-break', content: '', titleText: '' }, - { class: '', content: '2 standby', titleText: '' } + { class: 'popover-info', content: '2 standby', titleText: 'standby daemons: y, z' } ]; expect(pipe.transform(payload)).toEqual(expected); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mgr-summary.pipe.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mgr-summary.pipe.ts index b3782ca32c1..c99cd864635 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mgr-summary.pipe.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/mgr-summary.pipe.ts @@ -15,18 +15,23 @@ export class MgrSummaryPipe implements PipeTransform { } let activeCount = this.i18n('n/a'); - const titleText = _.isUndefined(value.active_name) + const activeTitleText = _.isUndefined(value.active_name) ? '' : `${this.i18n('active daemon')}: ${value.active_name}`; - if (titleText.length > 0) { + // There is always one standbyreplay to replace active daemon, if active one is down + if (activeTitleText.length > 0) { activeCount = '1'; } + const standbyHoverText = value.standbys.map((s: any): string => s.name).join(', '); + const standbyTitleText = !standbyHoverText + ? '' + : `${this.i18n('standby daemons')}: ${standbyHoverText}`; const standbyCount = value.standbys.length; const mgrSummary = [ { content: `${activeCount} ${this.i18n('active')}`, - class: 'mgr-active-name', - titleText: titleText + class: 'popover-info', + titleText: activeTitleText } ]; @@ -37,8 +42,8 @@ export class MgrSummaryPipe implements PipeTransform { }); mgrSummary.push({ content: `${standbyCount} ${this.i18n('standby')}`, - class: '', - titleText: '' + class: 'popover-info', + titleText: standbyTitleText }); return mgrSummary; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/osd-summary.pipe.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/osd-summary.pipe.spec.ts index 6332017dd71..5b7010907d3 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/osd-summary.pipe.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/osd-summary.pipe.spec.ts @@ -23,7 +23,11 @@ describe('OsdSummaryPipe', () => { it('transforms having 3 osd with 3 up, 3 in, 0 down, 0 out', () => { const value = { - osds: [{ up: 1, in: 1 }, { up: 1, in: 1 }, { up: 1, in: 1 }] + osds: [ + { up: 1, in: 1 }, + { up: 1, in: 1 }, + { up: 1, in: 1 } + ] }; expect(pipe.transform(value)).toEqual([ { @@ -43,7 +47,11 @@ describe('OsdSummaryPipe', () => { it('transforms having 3 osd with 2 up, 1 in, 1 down, 1 out', () => { const value = { - osds: [{ up: 1, in: 1 }, { up: 1, in: 0 }, { up: 0, in: 0 }] + osds: [ + { up: 1, in: 1 }, + { up: 1, in: 0 }, + { up: 0, in: 0 } + ] }; expect(pipe.transform(value)).toEqual([ { @@ -71,7 +79,11 @@ describe('OsdSummaryPipe', () => { it('transforms having 3 osd with 2 up, 2 in, 1 down, 0 out', () => { const value = { - osds: [{ up: 1, in: 1 }, { up: 1, in: 1 }, { up: 0, in: 0 }] + osds: [ + { up: 1, in: 1 }, + { up: 1, in: 1 }, + { up: 0, in: 0 } + ] }; expect(pipe.transform(value)).toEqual([ { @@ -99,7 +111,11 @@ describe('OsdSummaryPipe', () => { it('transforms having 3 osd with 3 up, 2 in, 0 down, 1 out', () => { const value = { - osds: [{ up: 1, in: 1 }, { up: 1, in: 1 }, { up: 1, in: 0 }] + osds: [ + { up: 1, in: 1 }, + { up: 1, in: 1 }, + { up: 1, in: 0 } + ] }; expect(pipe.transform(value)).toEqual([ { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.spec.ts index fcce5b21cbd..2b138eba7bf 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-form/nfs-form.component.spec.ts @@ -61,13 +61,11 @@ describe('NfsFormComponent', () => { fixture.detectChanges(); httpTesting.expectOne('api/summary').flush([]); - httpTesting - .expectOne('api/nfs-ganesha/daemon') - .flush([ - { daemon_id: 'node1', cluster_id: 'cluster1' }, - { daemon_id: 'node2', cluster_id: 'cluster1' }, - { daemon_id: 'node5', cluster_id: 'cluster2' } - ]); + httpTesting.expectOne('api/nfs-ganesha/daemon').flush([ + { daemon_id: 'node1', cluster_id: 'cluster1' }, + { daemon_id: 'node2', cluster_id: 'cluster1' }, + { daemon_id: 'node5', cluster_id: 'cluster2' } + ]); httpTesting.expectOne('ui-api/nfs-ganesha/fsals').flush(['CEPH', 'RGW']); httpTesting.expectOne('ui-api/nfs-ganesha/cephx/clients').flush(['admin', 'fs', 'rgw']); httpTesting.expectOne('ui-api/nfs-ganesha/cephfs/filesystems').flush([{ id: 1, name: 'a' }]); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.ts index 58d7a450bb2..27f30fbedfa 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/crush-rule-form-modal/crush-rule-form-modal.component.ts @@ -80,7 +80,10 @@ export class CrushRuleFormModalComponent implements OnInit { nodes.forEach((node) => { this.easyNodes[node.id] = node; }); - this.buckets = _.sortBy(nodes.filter((n) => n.children), 'name'); + this.buckets = _.sortBy( + nodes.filter((n) => n.children), + 'name' + ); this.names = names; this.preSelectRoot(); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts index 8a9128ce1fb..85c0fe6cd19 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts @@ -1283,9 +1283,15 @@ describe('PoolFormComponent', () => { form.get(controlName).markAsPristine(); beforeEach(() => { - ['algorithm', 'maxBlobSize', 'minBlobSize', 'mode', 'pgNum', 'ratio', 'name'].forEach( - (name) => markControlAsPreviouslySet(name) - ); + [ + 'algorithm', + 'maxBlobSize', + 'minBlobSize', + 'mode', + 'pgNum', + 'ratio', + 'name' + ].forEach((name) => markControlAsPreviouslySet(name)); fixture.detectChanges(); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts index d8ceabe1b1a..7c1b409155e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts @@ -107,7 +107,8 @@ export class PoolFormComponent implements OnInit { this.permission = this.authStorageService.getPermissions().pool; if ( !this.permission.read || - ((!this.permission.update && this.editing) || (!this.permission.create && !this.editing)) + (!this.permission.update && this.editing) || + (!this.permission.create && !this.editing) ) { this.router.navigate(['/404']); } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts index d31eed16658..1650421002c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.spec.ts @@ -320,7 +320,14 @@ describe('PoolListComponent', () => { stats: { bytes_used: { latest: 5, rate: 0, rates: [] }, max_avail: { latest: 15, rate: 0, rates: [] }, - rd_bytes: { latest: 6, rate: 4, rates: [[0, 2], [1, 6]] } + rd_bytes: { + latest: 6, + rate: 4, + rates: [ + [0, 2], + [1, 6] + ] + } }, pg_status: { 'active+clean': 8, down: 2 } }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/prometheus.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/prometheus.service.spec.ts index b7e4e565ac0..f552a20134c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/prometheus.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/prometheus.service.spec.ts @@ -128,7 +128,10 @@ describe('PrometheusService', () => { it('should get rewrite rules only', () => { service.getRules('rewrites').subscribe((rules) => { expect(rules).toEqual({ - groups: [{ name: 'test', rules: [] }, { name: 'recording_rule', rules: [] }] + groups: [ + { name: 'test', rules: [] }, + { name: 'recording_rule', rules: [] } + ] }); }); @@ -173,7 +176,10 @@ describe('PrometheusService', () => { beforeEach(() => { x = false; TestBed.get(SettingsService)['settings'] = {}; - service.ifAlertmanagerConfigured((v) => (x = v), () => (x = [])); + service.ifAlertmanagerConfigured( + (v) => (x = v), + () => (x = []) + ); host = 'http://localhost:9093'; }); @@ -211,7 +217,10 @@ describe('PrometheusService', () => { beforeEach(() => { x = false; TestBed.get(SettingsService)['settings'] = {}; - service.ifPrometheusConfigured((v) => (x = v), () => (x = [])); + service.ifPrometheusConfigured( + (v) => (x = v), + () => (x = []) + ); host = 'http://localhost:9090'; }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/critical-confirmation-modal/critical-confirmation-modal.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/critical-confirmation-modal/critical-confirmation-modal.component.spec.ts index adcb95632cd..65a02888339 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/critical-confirmation-modal/critical-confirmation-modal.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/critical-confirmation-modal/critical-confirmation-modal.component.spec.ts @@ -202,7 +202,7 @@ describe('CriticalConfirmationModalComponent', () => { spyOn(mockComponent.ctrlRef, 'hide').and.callThrough(); }); - it('should test fake deletion that closes modal', <any>fakeAsync(() => { + it('should test fake deletion that closes modal', fakeAsync(() => { // Before deletionCall expect(component.submitAction).not.toHaveBeenCalled(); // During deletionCall @@ -228,7 +228,7 @@ describe('CriticalConfirmationModalComponent', () => { spyOn(mockComponent, 'fakeDelete').and.callThrough(); }); - it('should delete and close modal', <any>fakeAsync(() => { + it('should delete and close modal', fakeAsync(() => { // During deletionCall component.callSubmitAction(); expect(mockComponent.finished).toBe(undefined); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/orchestrator-doc-panel/orchestrator-doc-panel.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/orchestrator-doc-panel/orchestrator-doc-panel.component.ts index f2f8b1eb8c9..484c422314a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/orchestrator-doc-panel/orchestrator-doc-panel.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/orchestrator-doc-panel/orchestrator-doc-panel.component.ts @@ -23,7 +23,7 @@ export class OrchestratorDocPanelComponent implements OnInit { } const releaseName = this.cephReleaseNamePipe.transform(summary.version); - this.docsUrl = `http://docs.ceph.com/docs/${releaseName}/mgr/orchestrator_cli/`; + this.docsUrl = `http://docs.ceph.com/docs/${releaseName}/mgr/orchestrator/`; setTimeout(() => { subs.unsubscribe(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.spec.ts index 90511da46f5..94a5d6f0f1b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.spec.ts @@ -41,7 +41,11 @@ describe('TableKeyValueComponent', () => { }); it('should make key value object pairs out of arrays with length two', () => { - component.data = [['someKey', 0], ['arrayKey', [1, 2, 3]], [3, 'something']]; + component.data = [ + ['someKey', 0], + ['arrayKey', [1, 2, 3]], + [3, 'something'] + ]; component.ngOnInit(); const expected: any = [ { key: 'arrayKey', value: '1, 2, 3' }, @@ -52,14 +56,20 @@ describe('TableKeyValueComponent', () => { }); it('should not show data supposed to be have hidden by key', () => { - component.data = [['a', 1], ['b', 2]]; + component.data = [ + ['a', 1], + ['b', 2] + ]; component.hideKeys = ['a']; component.ngOnInit(); expect(component.tableData).toEqual([{ key: 'b', value: 2 }]); }); it('should remove items with objects as values', () => { - component.data = [[3, 'something'], ['will be removed', { a: 3, b: 4, c: 5 }]]; + component.data = [ + [3, 'something'], + ['will be removed', { a: 3, b: 4, c: 5 }] + ]; component.ngOnInit(); expect(component.tableData).toEqual(<any>[{ key: 3, value: 'something' }]); }); @@ -74,7 +84,10 @@ describe('TableKeyValueComponent', () => { }); it('does nothing if data does not need to be converted', () => { - component.data = [{ key: 3, value: 'something' }, { key: 'someKey', value: 0 }]; + component.data = [ + { key: 3, value: 'something' }, + { key: 'someKey', value: 0 } + ]; component.ngOnInit(); expect(component.tableData).toEqual(component.data); }); @@ -91,8 +104,14 @@ describe('TableKeyValueComponent', () => { it('tests makePairs()', () => { const makePairs = (data: any) => component['makePairs'](data); expect(makePairs([['dash', 'board']])).toEqual([{ key: 'dash', value: 'board' }]); - const pair = [{ key: 'dash', value: 'board' }, { key: 'ceph', value: 'mimic' }]; - const pairInverse = [{ key: 'ceph', value: 'mimic' }, { key: 'dash', value: 'board' }]; + const pair = [ + { key: 'dash', value: 'board' }, + { key: 'ceph', value: 'mimic' } + ]; + const pairInverse = [ + { key: 'ceph', value: 'mimic' }, + { key: 'dash', value: 'board' } + ]; expect(makePairs(pair)).toEqual(pairInverse); expect(makePairs({ dash: 'board' })).toEqual([{ key: 'dash', value: 'board' }]); expect(makePairs({ dash: 'board', ceph: 'mimic' })).toEqual(pairInverse); @@ -101,7 +120,10 @@ describe('TableKeyValueComponent', () => { it('tests makePairsFromArray()', () => { const makePairsFromArray = (data: any[]) => component['makePairsFromArray'](data); expect(makePairsFromArray([['dash', 'board']])).toEqual([{ key: 'dash', value: 'board' }]); - const pair = [{ key: 'dash', value: 'board' }, { key: 'ceph', value: 'mimic' }]; + const pair = [ + { key: 'dash', value: 'board' }, + { key: 'ceph', value: 'mimic' } + ]; expect(makePairsFromArray(pair)).toEqual(pair); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html index c985616d3a6..ceef88337ab 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html @@ -254,7 +254,7 @@ <ng-template #perSecondTpl let-row="row" let-value="value"> - {{ value }} /s + {{ value | dimless }} /s </ng-template> <ng-template #executingTpl diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts index e8746739673..42c5817a937 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts @@ -161,7 +161,10 @@ describe('TableComponent', () => { // multiple expectColumnFiltered( - [{ filter: filterOdd, value: 'false' }, { filter: filterIndex, value: '2' }], + [ + { filter: filterOdd, value: 'false' }, + { filter: filterIndex, value: '2' } + ], [{ a: 2, b: 20, c: false }] ); @@ -361,14 +364,23 @@ describe('TableComponent', () => { }); it('should search through arrays', () => { - component.columns = [{ prop: 'a', name: 'Index' }, { prop: 'b', name: 'ArrayColumn' }]; + component.columns = [ + { prop: 'a', name: 'Index' }, + { prop: 'b', name: 'ArrayColumn' } + ]; - component.data = [{ a: 1, b: ['foo', 'bar'] }, { a: 2, b: ['baz', 'bazinga'] }]; + component.data = [ + { a: 1, b: ['foo', 'bar'] }, + { a: 2, b: ['baz', 'bazinga'] } + ]; expectSearch('bar', [{ a: 1, b: ['foo', 'bar'] }]); expectSearch('arraycolumn:bar arraycolumn:foo', [{ a: 1, b: ['foo', 'bar'] }]); expectSearch('arraycolumn:baz arraycolumn:inga', [{ a: 2, b: ['baz', 'bazinga'] }]); - component.data = [{ a: 1, b: [1, 2] }, { a: 2, b: [3, 4] }]; + component.data = [ + { a: 1, b: [1, 2] }, + { a: 2, b: [3, 4] } + ]; expectSearch('arraycolumn:1 arraycolumn:2', [{ a: 1, b: [1, 2] }]); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-validators.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-validators.spec.ts index 6890a4d09a7..1c85540d78b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-validators.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-validators.spec.ts @@ -321,7 +321,10 @@ describe('CdValidators', () => { describe('custom validation', () => { beforeEach(() => { form = new CdFormGroup({ - x: new FormControl(3, CdValidators.custom('odd', (x: number) => x % 2 === 1)), + x: new FormControl( + 3, + CdValidators.custom('odd', (x: number) => x % 2 === 1) + ), y: new FormControl( 5, CdValidators.custom('not-dividable-by-x', (y: number) => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.ts index d2b35b2599b..422c0b262ed 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/prometheus-notification.service.ts @@ -25,12 +25,10 @@ export class PrometheusNotificationService { if (this.backendFailure) { return; } - this.prometheusService - .getNotifications(_.last(this.notifications)) - .subscribe( - (notifications) => this.handleNotifications(notifications), - () => (this.backendFailure = true) - ); + this.prometheusService.getNotifications(_.last(this.notifications)).subscribe( + (notifications) => this.handleNotifications(notifications), + () => (this.backendFailure = true) + ); } private handleNotifications(notifications: AlertmanagerNotification[]) { diff --git a/src/pybind/mgr/dashboard/requirements-test.txt b/src/pybind/mgr/dashboard/requirements-test.txt index 9305006176e..e45e05a0e46 100644 --- a/src/pybind/mgr/dashboard/requirements-test.txt +++ b/src/pybind/mgr/dashboard/requirements-test.txt @@ -1,4 +1,3 @@ -mock; python_version <= '3.3' pytest<4 pytest-cov pytest-instafail diff --git a/src/pybind/mgr/mgr_util.py b/src/pybind/mgr/mgr_util.py index f470bd4bede..550df62a34c 100644 --- a/src/pybind/mgr/mgr_util.py +++ b/src/pybind/mgr/mgr_util.py @@ -1,8 +1,18 @@ +import cephfs import contextlib import datetime +import errno import os import socket +import time import logging +import sys +from threading import Lock, Condition, Event +from typing import no_type_check +if sys.version_info >= (3, 3): + from threading import Timer +else: + from threading import _Timer as Timer try: from typing import Tuple @@ -29,6 +39,231 @@ UNDERLINE_SEQ = "\033[4m" logger = logging.getLogger(__name__) +class CephfsConnectionException(Exception): + def __init__(self, error_code, error_message): + self.errno = error_code + self.error_str = error_message + + def to_tuple(self): + return self.errno, "", self.error_str + + def __str__(self): + return "{0} ({1})".format(self.errno, self.error_str) + + +class CephfsConnectionPool(object): + class Connection(object): + def __init__(self, mgr, fs_name): + self.fs = None + self.mgr = mgr + self.fs_name = fs_name + self.ops_in_progress = 0 + self.last_used = time.time() + self.fs_id = self.get_fs_id() + + def get_fs_id(self): + fs_map = self.mgr.get('fs_map') + for fs in fs_map['filesystems']: + if fs['mdsmap']['fs_name'] == self.fs_name: + return fs['id'] + raise CephfsConnectionException( + -errno.ENOENT, "FS '{0}' not found".format(self.fs_name)) + + def get_fs_handle(self): + self.last_used = time.time() + self.ops_in_progress += 1 + return self.fs + + def put_fs_handle(self, notify): + assert self.ops_in_progress > 0 + self.ops_in_progress -= 1 + if self.ops_in_progress == 0: + notify() + + def del_fs_handle(self, waiter): + if waiter: + while self.ops_in_progress != 0: + waiter() + if self.is_connection_valid(): + self.disconnect() + else: + self.abort() + + def is_connection_valid(self): + fs_id = None + try: + fs_id = self.get_fs_id() + except: + # the filesystem does not exist now -- connection is not valid. + pass + logger.debug("self.fs_id={0}, fs_id={1}".format(self.fs_id, fs_id)) + return self.fs_id == fs_id + + def is_connection_idle(self, timeout): + return (self.ops_in_progress == 0 and ((time.time() - self.last_used) >= timeout)) + + def connect(self): + assert self.ops_in_progress == 0 + logger.debug("Connecting to cephfs '{0}'".format(self.fs_name)) + self.fs = cephfs.LibCephFS(rados_inst=self.mgr.rados) + logger.debug("Setting user ID and group ID of CephFS mount as root...") + self.fs.conf_set("client_mount_uid", "0") + self.fs.conf_set("client_mount_gid", "0") + logger.debug("CephFS initializing...") + self.fs.init() + logger.debug("CephFS mounting...") + self.fs.mount(filesystem_name=self.fs_name.encode('utf-8')) + logger.debug("Connection to cephfs '{0}' complete".format(self.fs_name)) + self.mgr._ceph_register_client(self.fs.get_addrs()) + + def disconnect(self): + try: + assert self.fs + assert self.ops_in_progress == 0 + logger.info("disconnecting from cephfs '{0}'".format(self.fs_name)) + addrs = self.fs.get_addrs() + self.fs.shutdown() + self.mgr._ceph_unregister_client(addrs) + self.fs = None + except Exception as e: + logger.debug("disconnect: ({0})".format(e)) + raise + + def abort(self): + assert self.fs + assert self.ops_in_progress == 0 + logger.info("aborting connection from cephfs '{0}'".format(self.fs_name)) + self.fs.abort_conn() + logger.info("abort done from cephfs '{0}'".format(self.fs_name)) + self.fs = None + + class RTimer(Timer): + """ + recurring timer variant of Timer + """ + @no_type_check + def run(self): + try: + while not self.finished.is_set(): + self.finished.wait(self.interval) + self.function(*self.args, **self.kwargs) + self.finished.set() + except Exception as e: + logger.error("CephfsConnectionPool.RTimer: %s", e) + raise + + # TODO: make this configurable + TIMER_TASK_RUN_INTERVAL = 30.0 # seconds + CONNECTION_IDLE_INTERVAL = 60.0 # seconds + + def __init__(self, mgr): + self.mgr = mgr + self.connections = {} + self.lock = Lock() + self.cond = Condition(self.lock) + self.timer_task = CephfsConnectionPool.RTimer( + CephfsConnectionPool.TIMER_TASK_RUN_INTERVAL, + self.cleanup_connections) + self.timer_task.start() + + def cleanup_connections(self): + with self.lock: + logger.info("scanning for idle connections..") + idle_fs = [fs_name for fs_name, conn in self.connections.items() + if conn.is_connection_idle(CephfsConnectionPool.CONNECTION_IDLE_INTERVAL)] + for fs_name in idle_fs: + logger.info("cleaning up connection for '{}'".format(fs_name)) + self._del_fs_handle(fs_name) + + def get_fs_handle(self, fs_name): + with self.lock: + conn = None + try: + conn = self.connections.get(fs_name, None) + if conn: + if conn.is_connection_valid(): + return conn.get_fs_handle() + else: + # filesystem id changed beneath us (or the filesystem does not exist). + # this is possible if the filesystem got removed (and recreated with + # same name) via "ceph fs rm/new" mon command. + logger.warning("filesystem id changed for volume '{0}', reconnecting...".format(fs_name)) + self._del_fs_handle(fs_name) + conn = CephfsConnectionPool.Connection(self.mgr, fs_name) + conn.connect() + except cephfs.Error as e: + # try to provide a better error string if possible + if e.args[0] == errno.ENOENT: + raise CephfsConnectionException( + -errno.ENOENT, "FS '{0}' not found".format(fs_name)) + raise CephfsConnectionException(-e.args[0], e.args[1]) + self.connections[fs_name] = conn + return conn.get_fs_handle() + + def put_fs_handle(self, fs_name): + with self.lock: + conn = self.connections.get(fs_name, None) + if conn: + conn.put_fs_handle(notify=lambda: self.cond.notifyAll()) + + def _del_fs_handle(self, fs_name, wait=False): + conn = self.connections.pop(fs_name, None) + if conn: + conn.del_fs_handle(waiter=None if not wait else lambda: self.cond.wait()) + + def del_fs_handle(self, fs_name, wait=False): + with self.lock: + self._del_fs_handle(fs_name, wait) + + def del_all_handles(self): + with self.lock: + for fs_name in list(self.connections.keys()): + logger.info("waiting for pending ops for '{}'".format(fs_name)) + self._del_fs_handle(fs_name, wait=True) + logger.info("pending ops completed for '{}'".format(fs_name)) + # no new connections should have been initialized since its + # guarded on shutdown. + assert len(self.connections) == 0 + + +class CephfsClient(object): + def __init__(self, mgr): + self.mgr = mgr + self.stopping = Event() + self.connection_pool = CephfsConnectionPool(self.mgr) + + def is_stopping(self): + return self.stopping.is_set() + + def shutdown(self): + logger.info("shutting down") + # first, note that we're shutting down + self.stopping.set() + # second, delete all libcephfs handles from connection pool + self.connection_pool.del_all_handles() + + +@contextlib.contextmanager +def open_filesystem(fsc, fs_name): + """ + Open a volume with shared access. + This API is to be used as a context manager. + + :param fsc: cephfs client instance + :param fs_name: fs name + :return: yields a fs handle (ceph filesystem handle) + """ + if fsc.is_stopping(): + raise CephfsConnectionException(-errno.ESHUTDOWN, + "shutdown in progress") + + fs_handle = fsc.connection_pool.get_fs_handle(fs_name) + try: + yield fs_handle + finally: + fsc.connection_pool.put_fs_handle(fs_name) + + def colorize(msg, color, dark=False): """ Decorate `msg` with escape sequences to give the requested color diff --git a/src/pybind/mgr/requirements.txt b/src/pybind/mgr/requirements.txt index c43770d2d72..1ac1ff3130c 100644 --- a/src/pybind/mgr/requirements.txt +++ b/src/pybind/mgr/requirements.txt @@ -1,6 +1,4 @@ pytest-cov==2.7.1 -mock; python_version <= '3.3' -ipaddress; python_version < '3.3' -e../../python-common kubernetes requests-mock diff --git a/src/pybind/mgr/rook/CMakeLists.txt b/src/pybind/mgr/rook/CMakeLists.txt index a1a6aeeb010..15ba4c14938 100644 --- a/src/pybind/mgr/rook/CMakeLists.txt +++ b/src/pybind/mgr/rook/CMakeLists.txt @@ -1,18 +1,12 @@ -# if(WITH_MGR_DASHBOARD_FRONTEND AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64|arm|ARM") - -if (WITH_MGR_ROOK_CLIENT) add_custom_command( OUTPUT rook_client/__init__.py COMMAND ./generate_rook_ceph_client.sh - DEPENDS rook_cluster.py COMMENT "generating mgr/rook/rook_client" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/src/pybind/mgr/rook") add_custom_target(mgr-rook-client - ALL DEPENDS rook_client/__init__.py WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/src/pybind/mgr/rook" ) add_dependencies(ceph-mgr mgr-rook-client) -endif (WITH_MGR_ROOK_CLIENT)
\ No newline at end of file diff --git a/src/pybind/mgr/rook/generate_rook_ceph_client.sh b/src/pybind/mgr/rook/generate_rook_ceph_client.sh index 198394aa7ae..c9ad15ce016 100755 --- a/src/pybind/mgr/rook/generate_rook_ceph_client.sh +++ b/src/pybind/mgr/rook/generate_rook_ceph_client.sh @@ -1,6 +1,6 @@ #!/bin/sh -set -ex +set -e script_location="$(dirname "$(readlink -f "$0")")" cd "$script_location" diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini index 1227b33729e..3807894dfac 100644 --- a/src/pybind/mgr/tox.ini +++ b/src/pybind/mgr/tox.ini @@ -1,15 +1,22 @@ [tox] envlist = py3, mypy skipsdist = true +requires = cython [testenv] -setenv = UNITTEST = true -deps = -r requirements.txt +setenv = + UNITTEST = true + PYTHONPATH = ../../../build/lib/cython_modules/lib.3/ + LD_LIBRARY_PATH = ../../../build/lib +deps = + cython + -r requirements.txt commands = pytest -v --cov --cov-append --cov-report=term --doctest-modules {posargs:mgr_util.py tests/ cephadm/ pg_autoscaler/ progress/} [testenv:mypy] basepython = python3 deps = + cython -r requirements.txt mypy==0.770 commands = mypy --config-file=../../mypy.ini \ diff --git a/src/pybind/mgr/volumes/fs/operations/volume.py b/src/pybind/mgr/volumes/fs/operations/volume.py index c1030d39fed..110f206aba9 100644 --- a/src/pybind/mgr/volumes/fs/operations/volume.py +++ b/src/pybind/mgr/volumes/fs/operations/volume.py @@ -1,199 +1,19 @@ -import time import errno import logging import sys from contextlib import contextmanager -from threading import Lock, Condition -from typing import no_type_check -if sys.version_info >= (3, 3): - from threading import Timer -else: - from threading import _Timer as Timer - -import cephfs import orchestrator from .lock import GlobalLock from ..exception import VolumeException from ..fs_util import create_pool, remove_pool, create_filesystem, \ remove_filesystem, create_mds, volume_exists +from mgr_util import open_filesystem log = logging.getLogger(__name__) -class ConnectionPool(object): - class Connection(object): - def __init__(self, mgr, fs_name): - self.fs = None - self.mgr = mgr - self.fs_name = fs_name - self.ops_in_progress = 0 - self.last_used = time.time() - self.fs_id = self.get_fs_id() - - def get_fs_id(self): - fs_map = self.mgr.get('fs_map') - for fs in fs_map['filesystems']: - if fs['mdsmap']['fs_name'] == self.fs_name: - return fs['id'] - raise VolumeException( - -errno.ENOENT, "Volume '{0}' not found".format(self.fs_name)) - - def get_fs_handle(self): - self.last_used = time.time() - self.ops_in_progress += 1 - return self.fs - - def put_fs_handle(self, notify): - assert self.ops_in_progress > 0 - self.ops_in_progress -= 1 - if self.ops_in_progress == 0: - notify() - - def del_fs_handle(self, waiter): - if waiter: - while self.ops_in_progress != 0: - waiter() - if self.is_connection_valid(): - self.disconnect() - else: - self.abort() - - def is_connection_valid(self): - fs_id = None - try: - fs_id = self.get_fs_id() - except: - # the filesystem does not exist now -- connection is not valid. - pass - log.debug("self.fs_id={0}, fs_id={1}".format(self.fs_id, fs_id)) - return self.fs_id == fs_id - - def is_connection_idle(self, timeout): - return (self.ops_in_progress == 0 and ((time.time() - self.last_used) >= timeout)) - - def connect(self): - assert self.ops_in_progress == 0 - log.debug("Connecting to cephfs '{0}'".format(self.fs_name)) - self.fs = cephfs.LibCephFS(rados_inst=self.mgr.rados) - log.debug("Setting user ID and group ID of CephFS mount as root...") - self.fs.conf_set("client_mount_uid", "0") - self.fs.conf_set("client_mount_gid", "0") - log.debug("CephFS initializing...") - self.fs.init() - log.debug("CephFS mounting...") - self.fs.mount(filesystem_name=self.fs_name.encode('utf-8')) - log.debug("Connection to cephfs '{0}' complete".format(self.fs_name)) - self.mgr._ceph_register_client(self.fs.get_addrs()) - - def disconnect(self): - try: - assert self.fs - assert self.ops_in_progress == 0 - log.info("disconnecting from cephfs '{0}'".format(self.fs_name)) - addrs = self.fs.get_addrs() - self.fs.shutdown() - self.mgr._ceph_unregister_client(addrs) - self.fs = None - except Exception as e: - log.debug("disconnect: ({0})".format(e)) - raise - - def abort(self): - assert self.fs - assert self.ops_in_progress == 0 - log.info("aborting connection from cephfs '{0}'".format(self.fs_name)) - self.fs.abort_conn() - log.info("abort done from cephfs '{0}'".format(self.fs_name)) - self.fs = None - - class RTimer(Timer): - """ - recurring timer variant of Timer - """ - @no_type_check - def run(self): - try: - while not self.finished.is_set(): - self.finished.wait(self.interval) - self.function(*self.args, **self.kwargs) - self.finished.set() - except Exception as e: - log.error("ConnectionPool.RTimer: %s", e) - raise - - # TODO: make this configurable - TIMER_TASK_RUN_INTERVAL = 30.0 # seconds - CONNECTION_IDLE_INTERVAL = 60.0 # seconds - - def __init__(self, mgr): - self.mgr = mgr - self.connections = {} - self.lock = Lock() - self.cond = Condition(self.lock) - self.timer_task = ConnectionPool.RTimer(ConnectionPool.TIMER_TASK_RUN_INTERVAL, - self.cleanup_connections) - self.timer_task.start() - - def cleanup_connections(self): - with self.lock: - log.info("scanning for idle connections..") - idle_fs = [fs_name for fs_name,conn in self.connections.items() - if conn.is_connection_idle(ConnectionPool.CONNECTION_IDLE_INTERVAL)] - for fs_name in idle_fs: - log.info("cleaning up connection for '{}'".format(fs_name)) - self._del_fs_handle(fs_name) - - def get_fs_handle(self, fs_name): - with self.lock: - conn = None - try: - conn = self.connections.get(fs_name, None) - if conn: - if conn.is_connection_valid(): - return conn.get_fs_handle() - else: - # filesystem id changed beneath us (or the filesystem does not exist). - # this is possible if the filesystem got removed (and recreated with - # same name) via "ceph fs rm/new" mon command. - log.warning("filesystem id changed for volume '{0}', reconnecting...".format(fs_name)) - self._del_fs_handle(fs_name) - conn = ConnectionPool.Connection(self.mgr, fs_name) - conn.connect() - except cephfs.Error as e: - # try to provide a better error string if possible - if e.args[0] == errno.ENOENT: - raise VolumeException( - -errno.ENOENT, "Volume '{0}' not found".format(fs_name)) - raise VolumeException(-e.args[0], e.args[1]) - self.connections[fs_name] = conn - return conn.get_fs_handle() - - def put_fs_handle(self, fs_name): - with self.lock: - conn = self.connections.get(fs_name, None) - if conn: - conn.put_fs_handle(notify=lambda: self.cond.notifyAll()) - - def _del_fs_handle(self, fs_name, wait=False): - conn = self.connections.pop(fs_name, None) - if conn: - conn.del_fs_handle(waiter=None if not wait else lambda: self.cond.wait()) - - def del_fs_handle(self, fs_name, wait=False): - with self.lock: - self._del_fs_handle(fs_name, wait) - - def del_all_handles(self): - with self.lock: - for fs_name in list(self.connections.keys()): - log.info("waiting for pending ops for '{}'".format(fs_name)) - self._del_fs_handle(fs_name, wait=True) - log.info("pending ops completed for '{}'".format(fs_name)) - # no new connections should have been initialized since its - # guarded on shutdown. - assert len(self.connections) == 0 def gen_pool_names(volname): """ @@ -226,6 +46,7 @@ def create_volume(mgr, volname, placement): # create mds return create_mds(mgr, volname, placement) + def delete_volume(mgr, volname): """ delete the given module (tear down mds, remove filesystem) @@ -259,6 +80,7 @@ def delete_volume(mgr, volname): return r, outb, outs return remove_pool(mgr, data_pool) + def list_volumes(mgr): """ list all filesystem volumes. @@ -272,40 +94,32 @@ def list_volumes(mgr): result.append({'name': f['mdsmap']['fs_name']}) return result + @contextmanager def open_volume(vc, volname): """ - open a volume for exclusive access. This API is to be used as a context manager. + open a volume for exclusive access. This API is to be used as a contextr + manager. :param vc: volume client instance :param volname: volume name :return: yields a volume handle (ceph filesystem handle) """ - if vc.is_stopping(): - raise VolumeException(-errno.ESHUTDOWN, "shutdown in progress") - g_lock = GlobalLock() - fs_handle = vc.connection_pool.get_fs_handle(volname) - try: - with g_lock.lock_op(): + with g_lock.lock_op(): + with open_filesystem(vc, volname) as fs_handle: yield fs_handle - finally: - vc.connection_pool.put_fs_handle(volname) + @contextmanager def open_volume_lockless(vc, volname): """ - open a volume with shared access. This API is to be used as a context manager. + open a volume with shared access. This API is to be used as a context + manager. :param vc: volume client instance :param volname: volume name :return: yields a volume handle (ceph filesystem handle) """ - if vc.is_stopping(): - raise VolumeException(-errno.ESHUTDOWN, "shutdown in progress") - - fs_handle = vc.connection_pool.get_fs_handle(volname) - try: + with open_filesystem(vc, volname) as fs_handle: yield fs_handle - finally: - vc.connection_pool.put_fs_handle(volname) diff --git a/src/pybind/mgr/volumes/fs/volume.py b/src/pybind/mgr/volumes/fs/volume.py index 2f2d4e20e55..534cebf1de8 100644 --- a/src/pybind/mgr/volumes/fs/volume.py +++ b/src/pybind/mgr/volumes/fs/volume.py @@ -1,14 +1,13 @@ import json import errno import logging -from threading import Event -import cephfs +from mgr_util import CephfsClient from .fs_util import listdir -from .operations.volume import ConnectionPool, open_volume, create_volume, \ - delete_volume, list_volumes +from .operations.volume import create_volume, \ + delete_volume, list_volumes, open_volume from .operations.group import open_group, create_group, remove_group from .operations.subvolume import open_subvol, create_subvol, remove_subvol, \ create_clone @@ -20,12 +19,14 @@ from .purge_queue import ThreadPoolPurgeQueueMixin log = logging.getLogger(__name__) + def octal_str_to_decimal_int(mode): try: return int(mode, 8) except ValueError: raise VolumeException(-errno.EINVAL, "Invalid mode '{0}'".format(mode)) + def name_to_json(names): """ convert the list of names to json @@ -35,13 +36,12 @@ def name_to_json(names): namedict.append({'name': names[i].decode('utf-8')}) return json.dumps(namedict, indent=4, sort_keys=True) -class VolumeClient(object): + +class VolumeClient(CephfsClient): def __init__(self, mgr): - self.mgr = mgr - self.stopping = Event() + super().__init__(mgr) # volume specification self.volspec = VolSpec(mgr.rados.conf_get('client_snapdir')) - self.connection_pool = ConnectionPool(self.mgr) # TODO: make thread pool size configurable self.cloner = Cloner(self, 4) self.purge_queue = ThreadPoolPurgeQueueMixin(self, 4) @@ -55,10 +55,8 @@ class VolumeClient(object): self.cloner.queue_job(fs['mdsmap']['fs_name']) self.purge_queue.queue_job(fs['mdsmap']['fs_name']) - def is_stopping(self): - return self.stopping.is_set() - def shutdown(self): + # Overrides CephfsClient.shutdown() log.info("shutting down") # first, note that we're shutting down self.stopping.set() diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py index e2c56964040..5036e0668e7 100755 --- a/src/pybind/rados/setup.py +++ b/src/pybind/rados/setup.py @@ -64,17 +64,20 @@ __version__ = '2.0.0' def get_python_flags(libs): py_libs = sum((libs.split() for libs in distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), []) + ldflags = list(filterfalse(lambda lib: lib.startswith('-l'), py_libs)) + py_libs = [lib.replace('-l', '') for lib in + filter(lambda lib: lib.startswith('-l'), py_libs)] compiler = new_compiler() distutils.sysconfig.customize_compiler(compiler) return dict( include_dirs=[distutils.sysconfig.get_python_inc()], library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), - libraries=libs + [lib.replace('-l', '') for lib in py_libs], + libraries=libs + py_libs, extra_compile_args=filter_unsupported_flags( compiler.compiler[0], distutils.sysconfig.get_config_var('CFLAGS').split()), extra_link_args=(distutils.sysconfig.get_config_var('LDFLAGS').split() + - distutils.sysconfig.get_config_var('LINKFORSHARED').split())) + ldflags)) def check_sanity(): diff --git a/src/pybind/rbd/setup.py b/src/pybind/rbd/setup.py index 634484f1402..2f4a2a5339f 100755 --- a/src/pybind/rbd/setup.py +++ b/src/pybind/rbd/setup.py @@ -61,17 +61,20 @@ __version__ = '2.0.0' def get_python_flags(libs): py_libs = sum((libs.split() for libs in distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), []) + ldflags = list(filterfalse(lambda lib: lib.startswith('-l'), py_libs)) + py_libs = [lib.replace('-l', '') for lib in + filter(lambda lib: lib.startswith('-l'), py_libs)] compiler = new_compiler() distutils.sysconfig.customize_compiler(compiler) return dict( include_dirs=[distutils.sysconfig.get_python_inc()], library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), - libraries=libs + [lib.replace('-l', '') for lib in py_libs], + libraries=libs + py_libs, extra_compile_args=filter_unsupported_flags( compiler.compiler[0], distutils.sysconfig.get_config_var('CFLAGS').split()), extra_link_args=(distutils.sysconfig.get_config_var('LDFLAGS').split() + - distutils.sysconfig.get_config_var('LINKFORSHARED').split())) + ldflags)) def check_sanity(): diff --git a/src/pybind/rgw/setup.py b/src/pybind/rgw/setup.py index eb1591a460a..882807cd014 100755 --- a/src/pybind/rgw/setup.py +++ b/src/pybind/rgw/setup.py @@ -62,17 +62,20 @@ __version__ = '2.0.0' def get_python_flags(libs): py_libs = sum((libs.split() for libs in distutils.sysconfig.get_config_vars('LIBS', 'SYSLIBS')), []) + ldflags = list(filterfalse(lambda lib: lib.startswith('-l'), py_libs)) + py_libs = [lib.replace('-l', '') for lib in + filter(lambda lib: lib.startswith('-l'), py_libs)] compiler = new_compiler() distutils.sysconfig.customize_compiler(compiler) return dict( include_dirs=[distutils.sysconfig.get_python_inc()], library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'), - libraries=libs + [lib.replace('-l', '') for lib in py_libs], + libraries=libs + py_libs, extra_compile_args=filter_unsupported_flags( compiler.compiler[0], distutils.sysconfig.get_config_var('CFLAGS').split()), extra_link_args=(distutils.sysconfig.get_config_var('LDFLAGS').split() + - distutils.sysconfig.get_config_var('LINKFORSHARED').split())) + ldflags)) def check_sanity(): diff --git a/src/script/backport-create-issue b/src/script/backport-create-issue index a599bd305f7..091043fddd2 100755 --- a/src/script/backport-create-issue +++ b/src/script/backport-create-issue @@ -122,7 +122,7 @@ def connect_to_redmine(a): def releases(): return ('argonaut', 'bobtail', 'cuttlefish', 'dumpling', 'emperor', 'firefly', 'giant', 'hammer', 'infernalis', 'jewel', 'kraken', - 'luminous', 'mimic', 'nautilus') + 'luminous', 'mimic', 'nautilus', 'octopus') def populate_status_dict(r): for status in r.issue_status.all(): diff --git a/src/seastar b/src/seastar -Subproject 2670723feec5fc99d1f709aaf6fd3dc2b17a3f7 +Subproject 663f9bb6cb2b20feb8448674eaa6a743cd513e5 diff --git a/src/test/cls_rbd/test_cls_rbd.cc b/src/test/cls_rbd/test_cls_rbd.cc index ef753b74980..cb79e064dc4 100644 --- a/src/test/cls_rbd/test_cls_rbd.cc +++ b/src/test/cls_rbd/test_cls_rbd.cc @@ -1811,7 +1811,7 @@ TEST_F(TestClsRbd, mirror_image_status) { map<std::string, cls::rbd::MirrorImage> images; map<std::string, cls::rbd::MirrorImageStatus> statuses; - std::map<cls::rbd::MirrorImageStatusState, int> states; + std::map<cls::rbd::MirrorImageStatusState, int32_t> states; std::map<std::string, entity_inst_t> instances; cls::rbd::MirrorImageStatus read_status; entity_inst_t read_instance; diff --git a/src/test/crimson/test_messenger.cc b/src/test/crimson/test_messenger.cc index 68d6da744dd..4a5b3f745d8 100644 --- a/src/test/crimson/test_messenger.cc +++ b/src/test/crimson/test_messenger.cc @@ -932,7 +932,7 @@ class FailoverSuite : public Dispatcher { unsigned pending_establish = 0; unsigned replaced_conns = 0; for (auto& result : interceptor.results) { - if (result.conn->is_closed()) { + if (result.conn->is_closed_clean()) { if (result.state == conn_state_t::replaced) { ++replaced_conns; } @@ -1122,7 +1122,8 @@ class FailoverSuite : public Dispatcher { seastar::future<> markdown() { logger().info("[Test] markdown()"); ceph_assert(tracked_conn); - return tracked_conn->close(); + tracked_conn->mark_down(); + return seastar::now(); } seastar::future<> wait_blocked() { @@ -1375,6 +1376,7 @@ class FailoverSuitePeer : public Dispatcher { } seastar::future<> ms_handle_accept(ConnectionRef conn) override { + logger().info("[TestPeer] got accept from Test"); ceph_assert(!tracked_conn || tracked_conn->is_closed() || tracked_conn == conn); @@ -1383,6 +1385,7 @@ class FailoverSuitePeer : public Dispatcher { } seastar::future<> ms_handle_reset(ConnectionRef conn) override { + logger().info("[TestPeer] got reset from Test"); ceph_assert(tracked_conn == conn); tracked_conn = nullptr; return seastar::now(); @@ -1468,7 +1471,8 @@ class FailoverSuitePeer : public Dispatcher { seastar::future<> markdown() { logger().info("[TestPeer] markdown()"); ceph_assert(tracked_conn); - return tracked_conn->close(); + tracked_conn->mark_down(); + return seastar::now(); } static seastar::future<std::unique_ptr<FailoverSuitePeer>> diff --git a/src/test/docker-test-helper.sh b/src/test/docker-test-helper.sh index d13926b7a2c..14814201cbe 100755 --- a/src/test/docker-test-helper.sh +++ b/src/test/docker-test-helper.sh @@ -25,15 +25,16 @@ function setup_container() { local os_type=$1 local os_version=$2 local opts="$3" + local dockercmd=$4 local image=$(get_image_name $os_type $os_version) local build=true - if docker images $image | grep --quiet "^$image " ; then - eval touch --date=$(docker inspect $image | jq '.[0].Created') $image + if $dockercmd images $image | grep --quiet "^$image " ; then + eval touch --date=$($dockercmd inspect $image | jq '.[0].Created') $image found=$(find -L test/$os_type-$os_version/* -newer $image) rm $image if test -n "$found" ; then - docker rmi $image + $dockercmd rmi $image else build=false fi @@ -48,7 +49,7 @@ function setup_container() { os_version=$os_version user_id=$(id -u) \ perl -p -e 's/%%(\w+)%%/$ENV{$1}/g' \ dockerfile/Dockerfile.in > dockerfile/Dockerfile - docker $opts build --tag=$image dockerfile + $dockercmd $opts build --tag=$image dockerfile rm -fr dockerfile fi } @@ -110,9 +111,11 @@ function run_in_docker() { local opts="$1" shift local script=$1 + shift + local dockercmd=$1 setup_downstream $os_type $os_version $ref || return 1 - setup_container $os_type $os_version "$opts" || return 1 + setup_container $os_type $os_version "$opts" $dockercmd || return 1 local downstream=$(get_downstream $os_type $os_version) local image=$(get_image_name $os_type $os_version) local upstream=$(get_upstream) @@ -120,7 +123,7 @@ function run_in_docker() { mkdir -p $HOME/.ccache ccache="--volume $HOME/.ccache:$HOME/.ccache" user="--user $USER" - local cmd="docker run $opts --rm --name $image --privileged $ccache" + local cmd="$dockercmd run $opts --rm --name $image --privileged $ccache" cmd+=" --volume $downstream:$downstream" cmd+=" --volume $upstream:$upstream" local status=0 @@ -137,15 +140,17 @@ function run_in_docker() { function remove_all() { local os_type=$1 local os_version=$2 + local dockercmd=$3 local image=$(get_image_name $os_type $os_version) - docker rm $image - docker rmi $image + $dockercmd rm $image + $dockercmd rmi $image } function usage() { cat <<EOF -Run commands within Ceph sources, in a docker container +Run commands within Ceph sources, in a container. Use podman if available, +docker if not. $0 [options] command args ... [-h|--help] display usage @@ -237,7 +242,12 @@ EOF } function main_docker() { - if ! docker ps > /dev/null 2>&1 ; then + local dockercmd="docker" + if type podman > /dev/null; then + dockercmd="podman" + fi + + if ! $dockercmd ps > /dev/null 2>&1 ; then echo "docker not available: $0" return 0 fi @@ -315,11 +325,11 @@ function main_docker() { for os_type in ${!os_type2versions[@]} ; do for os_version in ${os_type2versions[$os_type]} ; do if $remove ; then - remove_all $os_type $os_version || return 1 + remove_all $os_type $os_version $dockercmd || return 1 elif $shell ; then - run_in_docker $os_type $os_version $ref "$opts" SHELL || return 1 + run_in_docker $os_type $os_version $ref "$opts" SHELL $dockercmd || return 1 else - run_in_docker $os_type $os_version $ref "$opts" "$@" || return 1 + run_in_docker $os_type $os_version $ref "$opts" "$@" $dockercmd || return 1 fi done done diff --git a/src/test/erasure-code/CMakeLists.txt b/src/test/erasure-code/CMakeLists.txt index 721f6c36750..49f12adc918 100644 --- a/src/test/erasure-code/CMakeLists.txt +++ b/src/test/erasure-code/CMakeLists.txt @@ -79,7 +79,7 @@ target_link_libraries(unittest_erasure_code_plugin_jerasure add_dependencies(unittest_erasure_code_plugin_jerasure ec_jerasure) -if(HAVE_BETTER_YASM_ELF64) +if(HAVE_BETTER_YASM_ELF64 OR HAVE_ARMV8_SIMD) #unittest_erasure_code_isa add_executable(unittest_erasure_code_isa @@ -110,7 +110,7 @@ target_link_libraries(unittest_erasure_code_plugin_isa ) add_dependencies(unittest_erasure_code_plugin_isa ec_isa) -endif(HAVE_BETTER_YASM_ELF64) +endif(HAVE_BETTER_YASM_ELF64 OR HAVE_ARMV8_SIMD) # unittest_erasure_code_lrc add_executable(unittest_erasure_code_lrc diff --git a/src/test/fedora-29/Dockerfile.in b/src/test/fedora-31/Dockerfile.in index fbb88d86628..3598271f6ae 100644 --- a/src/test/fedora-29/Dockerfile.in +++ b/src/test/fedora-31/Dockerfile.in @@ -22,8 +22,5 @@ FROM fedora:%%os_version%% COPY install-deps.sh /root/ COPY ceph.spec.in /root/ # build dependencies -RUN dnf install -y which ; cd /root ; ./install-deps.sh -# development tools -# nc is required to run make check on firefly only (giant+ do not use nc) -RUN dnf install -y ccache valgrind gdb git python-virtualenv gdisk kpartx jq sudo xmlstarlet parted nc +RUN dnf install -y which gdb git sudo; cd /root ; ./install-deps.sh RUN if test %%USER%% != root ; then useradd -M --uid %%user_id%% %%USER%% && echo '%%USER%% ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers ; fi diff --git a/src/test/fedora-29/ceph.spec.in b/src/test/fedora-31/ceph.spec.in index 9abcafd12db..9abcafd12db 120000 --- a/src/test/fedora-29/ceph.spec.in +++ b/src/test/fedora-31/ceph.spec.in diff --git a/src/test/fedora-29/install-deps.sh b/src/test/fedora-31/install-deps.sh index fc9c78b27ff..fc9c78b27ff 120000 --- a/src/test/fedora-29/install-deps.sh +++ b/src/test/fedora-31/install-deps.sh diff --git a/src/test/librbd/fsx.cc b/src/test/librbd/fsx.cc index cee2a089602..503e0b2af2d 100644 --- a/src/test/librbd/fsx.cc +++ b/src/test/librbd/fsx.cc @@ -2437,11 +2437,12 @@ void clone_filename(char *buf, size_t len, int clones) void clone_imagename(char *buf, size_t len, int clones) { - if (clones > 0) + if (clones > 0) { snprintf(buf, len, "%s-clone%d", iname, clones); - else - strncpy(buf, iname, len); - buf[len - 1] = '\0'; + } else { + strncpy(buf, iname, len - 1); + buf[len - 1] = '\0'; + } } void replay_imagename(char *buf, size_t len, int clones) diff --git a/src/test/test_lost.sh b/src/test/test_lost.sh index d8246b27327..ee04dd18004 100755 --- a/src/test/test_lost.sh +++ b/src/test/test_lost.sh @@ -27,7 +27,7 @@ setup() { for pool in `./ceph osd pool ls`; do local size=`./ceph osd pool get ${pool} size | awk '{print $2}'` if [ "${size}" -gt "${CEPH_NUM_OSD}" ]; then - ./ceph osd pool set ${pool} size ${CEPH_NUM_OSD} + ./ceph osd pool set ${pool} size ${CEPH_NUM_OSD} --yes-i-really-mean-it changed=1 fi done diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index 88b1d89852e..9af05cfdf6d 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -169,7 +169,7 @@ void usage(ostream& out) " cache-try-flush-evict-all try-flush+evict all objects\n" "\n" "GLOBAL OPTIONS:\n" -" --object_locator object_locator\n" +" --object-locator object_locator\n" " set object_locator for operation\n" " -p pool\n" " --pool=pool\n" @@ -2216,7 +2216,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts, } if (oloc.size()) { if (!pool_name) { - cerr << "pool name must be specified with --object_locator" << std::endl; + cerr << "pool name must be specified with --object-locator" << std::endl; return 1; } io_ctx.locator_set_key(oloc); diff --git a/src/vstart.sh b/src/vstart.sh index 5396ea0ab33..31c67ee45de 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -1269,6 +1269,7 @@ mon_osd_reporter_subtree_level = osd mon_data_avail_warn = 2 mon_data_avail_crit = 1 mon_allow_pool_delete = true +mon_allow_pool_size_one = true [osd] osd_scrub_load_threshold = 2000 |