Skip to content

Commit 834a5f5

Browse files
author
Marcin Przepiorowski
committed
Version 2.4.15.1
2 parents 74ed194 + ba489f8 commit 834a5f5

37 files changed

+3257
-1818
lines changed

.github/workflows/build.yml

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,54 @@ jobs:
149149
name: cento6build
150150
path: ${{ env.FILENAME }}
151151

152+
oel8:
153+
needs: [centos7]
154+
runs-on: ubuntu-latest
155+
156+
steps:
157+
- name: checkout dxtoolkit code
158+
uses: actions/checkout@master
159+
160+
- name: Set up a Perl container
161+
#uses: pioro/dxtoolkit@develop
162+
uses: docker://pioro/dxperloel8:5.26
163+
with:
164+
ENCKEY: ${{ secrets.ENCKEY }}
165+
166+
- name: Get the version
167+
id: get_version
168+
run: |
169+
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
170+
SOURCE_TAG=${GITHUB_REF#refs/tags/}
171+
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
172+
SOURCE_TAG=${GITHUB_REF#refs/heads/}
173+
else
174+
exit 1
175+
fi
176+
FILENAME="dxtoolkit2-${SOURCE_TAG}-redhat8-installer.tar.gz"
177+
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
178+
echo FILENAME=$FILENAME >> $GITHUB_ENV
179+
180+
- name: add examples
181+
run: |
182+
gzip -d dxtoolkit.tar.gz
183+
tar -rvf dxtoolkit.tar bin/dxtools.conf.example bin/dxusers.csv.example
184+
gzip dxtoolkit.tar
185+
186+
- name: compress toolkit
187+
run: |
188+
mv dxtoolkit.tar.gz ${{ env.FILENAME }}
189+
190+
- name: Upload oel 8
191+
uses: actions/upload-artifact@v1
192+
with:
193+
name: oel8build
194+
path: ${{ env.FILENAME }}
195+
196+
152197
Windows:
153198
needs: [centos7]
154-
runs-on: windows-2016
199+
runs-on: windows-latest
155200

156201
steps:
157202
- name: checkout dxtoolkit code
@@ -347,6 +392,13 @@ jobs:
347392
with:
348393
name: osxbuild
349394

395+
396+
- name: Download OEL8
397+
uses: actions/download-artifact@v1
398+
with:
399+
name: oel8build
400+
401+
350402
- name: Say
351403
run: |
352404
echo "HELLO"
@@ -359,13 +411,15 @@ jobs:
359411
SOURCE_TAG=${GITHUB_REF#refs/tags/}
360412
FILENAMERH7="dxtoolkit2-${SOURCE_TAG}-redhat7-installer.tar.gz"
361413
FILENAMERH6="dxtoolkit2-${SOURCE_TAG}-redhat6-installer.tar.gz"
414+
FILENAMERH8="dxtoolkit2-${SOURCE_TAG}-redhat8-installer.tar.gz"
362415
FILENAMEUBUNTU="dxtoolkit2-${SOURCE_TAG}-ubuntu1804-installer.tar.gz"
363416
FILENAMEWIN="dxtoolkit2-${SOURCE_TAG}-win64-installer.zip"
364417
FILENAMEOSX="dxtoolkit2-${SOURCE_TAG}-osx.tar.gz"
365418
366419
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
367420
echo FILENAMERH7=$FILENAMERH7 >> $GITHUB_ENV
368421
echo FILENAMERH6=$FILENAMERH6 >> $GITHUB_ENV
422+
echo FILENAMERH8=$FILENAMERH8 >> $GITHUB_ENV
369423
echo FILENAMEUBUNTU=$FILENAMEUBUNTU >> $GITHUB_ENV
370424
echo FILENAMEWIN=$FILENAMEWIN >> $GITHUB_ENV
371425
echo FILENAMEOSX=$FILENAMEOSX >> $GITHUB_ENV
@@ -378,5 +432,5 @@ jobs:
378432
name: Release ${{ env.SOURCE_TAG }}
379433
draft: true
380434
prerelease: true
381-
artifacts: "cento7build/${{ env.FILENAMERH7 }},cento6build/${{ env.FILENAMERH6 }},ubuntubuild/${{ env.FILENAMEUBUNTU }},windowsbuild/${{ env.FILENAMEWIN }},osxbuild/${{ env.FILENAMEOSX }}"
435+
artifacts: "cento7build/${{ env.FILENAMERH7 }},cento6build/${{ env.FILENAMERH6 }},oel8build/${{ env.FILENAMERH8 }},ubuntubuild/${{ env.FILENAMEUBUNTU }},windowsbuild/${{ env.FILENAMEWIN }},osxbuild/${{ env.FILENAMEOSX }}"
382436
tag: ${{ env.SOURCE_TAG }}

.github/workflows/develop.yml

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,56 @@ jobs:
169169
name: cento6build
170170
path: ${{ env.FILENAME }}
171171

172+
173+
oel8:
174+
needs: [centos7]
175+
runs-on: ubuntu-latest
176+
177+
steps:
178+
- name: checkout dxtoolkit code
179+
uses: actions/checkout@master
180+
181+
- name: Set up a Perl container
182+
#uses: pioro/dxtoolkit@develop
183+
uses: docker://pioro/dxperloel8:5.26
184+
with:
185+
ENCKEY: ${{ secrets.ENCKEY }}
186+
187+
- name: Get the version
188+
id: get_version
189+
run: |
190+
if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then
191+
SOURCE_TAG=${GITHUB_REF#refs/tags/}
192+
elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then
193+
SOURCE_TAG=${GITHUB_REF#refs/heads/}
194+
else
195+
exit 1
196+
fi
197+
FILENAME="dxtoolkit2-${SOURCE_TAG}-redhat8-installer.tar.gz"
198+
echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV
199+
echo FILENAME=$FILENAME >> $GITHUB_ENV
200+
201+
- name: add examples
202+
run: |
203+
gzip -d dxtoolkit.tar.gz
204+
tar -rvf dxtoolkit.tar bin/dxtools.conf.example bin/dxusers.csv.example
205+
gzip dxtoolkit.tar
206+
207+
- name: compress toolkit
208+
run: |
209+
mv dxtoolkit.tar.gz ${{ env.FILENAME }}
210+
211+
- name: Upload oel 8
212+
uses: actions/upload-artifact@v1
213+
with:
214+
name: oel8build
215+
path: ${{ env.FILENAME }}
216+
217+
218+
172219
Windows:
173220
needs: [centos7]
174-
runs-on: windows-2016
221+
runs-on: windows-latest
175222

176223
steps:
177224
- name: checkout dxtoolkit code

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
## 2.4.15.1
2+
3+
### Added
4+
- [enhancement #194](https://github.com/delphix/dxtoolkit/issues/194) Last refresh date added to dx_get_db_env as a new column
5+
- dx_get_source_info is displaying now a status for Validated Sync opertion for MS SQL and Sybase
6+
- dx_get_db_env has a new column showing last VDB refresh time
7+
- dx_get_vdbsize - new script to display total storage used by VDB
8+
9+
10+
### Changed
11+
- [bug #197](https://github.com/delphix/dxtoolkit/issues/197) dx_get_db_env is displaying now a parent snapshot / time of the parent dSource / VDB - not a rollback one
12+
- [bug #185](https://github.com/delphix/dxtoolkit/issues/185) dx_get_db_env is not displaying errors for replicated objects
13+
- [bug #190](https://github.com/delphix/dxtoolkit/issues/190) dx_provision_db works with None snapshot policy
14+
- [bug #198](https://github.com/delphix/dxtoolkit/issues/198) dx_get_source_info failing with vFiles dSources
15+
- [bug #199](https://github.com/delphix/dxtoolkit/issues/199) reserved space added to dx_get_appliance
16+
17+
118
## 2.4.14.1
219

320
### Changed

bin/dx_ctl_replication.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ =head1 Example
207207
208208
Replicate a profile called "backup"
209209
210-
dx_get_replication -d DelphixEngine -profilename backup -nowait
210+
dx_ctl_replication -d DelphixEngine -profilename backup -nowait
211211
Replication job JOB-7425 started in background
212212
213213
=cut

bin/dx_get_appliance.pl

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,39 @@ =head1 OPTIONS
243243
244244
=back
245245
246+
=head1 COLUMNS
247+
248+
Columns description
249+
250+
=over 1
251+
252+
=item B<Appliance> - Delphix Engine name from dxtools.conf file
253+
254+
=item B<Status> - Status of Delphix Engine
255+
256+
=item B<Version> - Version of Delphix Engine
257+
258+
=item B<Total> - Total storage allocated to Delphix Engine
259+
260+
=item B<Used> - Used space. Up to version 6.0.7 this is space used by data objects. Since 6.0.7 this include a reserved space as well.
261+
262+
=item B<Free> - Free space on engine
263+
264+
=item B<PctUsed> - Percent of used space
265+
266+
=item B<dSource#> - Number of dSources on the engine
267+
268+
=item B<VDBs#> - Number of VDBs on the engine
269+
270+
=item B<Total Objects> - Total number of objects on the engine
271+
272+
=item B<vCpu> - No of vCPU allocated to the engine
273+
274+
=item B<vMem> - Size of memory allocated to the engine
275+
276+
=back
277+
278+
246279
=head1 EXAMPLES
247280
248281
Display a Delphix Engine summary
@@ -253,5 +286,12 @@ =head1 EXAMPLES
253286
-------------------- -------- -------- ---------- ---------- ---------- ---------- -------- -------- --------
254287
Landshark5 UP 5.0.5.1 28.82 5.20 23.62 0.18 8 4 12
255288
289+
Display a Delphix Engine details
290+
291+
dx_get_appliance.pl -d dxt1 -details
292+
293+
Appliance Status Version Total (GB) Used (GB) Free (GB) PctUsed(%) dSource# VDBs# Total Ob vCpu vMem [GB]
294+
-------------------- -------- -------- ---------- ---------- ---------- ---------- -------- -------- -------- -------- ---------
295+
dxt1 UP 6.0.11.0 33.42 9.17 24.25 27.44 1 2 3 4 15.88
256296
257297
=cut

bin/dx_get_config.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,20 @@
7979

8080

8181
# this array will have all engines to go through (if -d is specified it will be only one engine)
82-
my $engine_list = Toolkit_helpers::get_engine_list($all, $dx_host, $engine_obj, 'sysadmin');
82+
my $engine_list = Toolkit_helpers::get_engine_list($all, $dx_host, $engine_obj);
8383

8484
my $ret = 0;
8585

8686
for my $engine ( sort (@{$engine_list}) ) {
8787
# main loop for all work
8888
if ($engine_obj->dlpx_connect($engine)) {
89-
print "Can't connect to Dephix Engine $dx_host\n\n";
89+
print "Can't connect to Dephix Engine $engine\n\n";
9090
$ret = $ret + 1;
9191
next;
9292
};
9393

94-
if (lc $engine_obj->getUsername() ne 'sysadmin') {
95-
print "User sysadmin is required for this script to run. Please check dxtools.conf entry for $engine\n";
94+
if ($engine_obj->getCurrentUserType() ne 'SYSTEM') {
95+
print "User with sysadmin role is required for this script to run. Please check config file entry for $engine\n";
9696
next;
9797
}
9898

bin/dx_get_db_env.pl

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
'backup=s' => \(my $backup),
8282
'olderthan=s' => \(my $creationtime),
8383
'save=s' => \(my $save),
84+
'timeflowparent' => \(my $timeflowparent),
8485
'dever=s' => \(my $dever),
8586
'all' => (\my $all),
8687
'version' => \(my $print_version),
@@ -236,7 +237,8 @@
236237
{'Enabled' ,10},
237238
{'Unique Name' ,30},
238239
{'Parent time' ,35},
239-
{'VDB creation time' ,35}
240+
{'VDB creation time',35},
241+
{'VDB refresh time' ,35}
240242
);
241243
}
242244
}
@@ -326,6 +328,8 @@
326328

327329
my $snaploaded = 0;
328330

331+
my $refreshdate;
332+
329333
# for filtered databases on current engine - display status
330334
for my $dbitem ( @db_display_list ) {
331335
my $dbobj = $databases->getDB($dbitem);
@@ -406,8 +410,30 @@
406410

407411
} else {
408412

409-
$parentsnap = $timeflows->getParentSnapshot($dbobj->getCurrentTimeflow());
413+
my $timeflow_for_parent;
414+
415+
if ($dbobj->getType() eq 'VDB') {
416+
my $hier = $timeflows->generateHierarchy(undef, undef, $databases);
417+
418+
$refreshdate = $timeflows->findrefreshtime($dbobj->getCurrentTimeflow(), $hier, $dbobj->getReference());
419+
410420

421+
422+
423+
if (defined($timeflowparent)) {
424+
# old behaviour - it will show a rollback as a parent
425+
# add flag -timeflowparent to activate
426+
$timeflow_for_parent = $dbobj->getCurrentTimeflow();
427+
} else {
428+
# fixed behaviour - it will always display a snapshot of parent used for refresh
429+
$timeflow_for_parent = $timeflows->findrefresh($dbobj->getCurrentTimeflow(), $hier, $dbobj->getReference());
430+
}
431+
} else {
432+
$refreshdate = 'N/A';
433+
}
434+
435+
436+
$parentsnap = $timeflows->getParentSnapshot($timeflow_for_parent);
411437
if (lc $parentlast eq 'p') {
412438
if (($parentsnap ne '') && ($dbobj->getType() eq 'VDB')) {
413439
if (defined($snapshots)) {
@@ -430,9 +456,9 @@
430456
$ret = $ret + 1;
431457
}
432458
($snaptime,$timezone) = $snapshots->getSnapshotTimewithzone($parentsnap);
433-
$parenttime = $timeflows->getParentPointTimestampWithTimezone($dbobj->getCurrentTimeflow(), $timezone);
459+
$parenttime = $timeflows->getParentPointTimestampWithTimezone($timeflow_for_parent, $timezone);
434460
if (defined($parenttime) && ($parenttime eq 'N/A')) {
435-
my $loc = $timeflows->getParentPointLocation($dbobj->getCurrentTimeflow());
461+
my $loc = $timeflows->getParentPointLocation($timeflow_for_parent);
436462
my $lastsnaploc = $snapshots->getlatestChangePoint($parentsnap);
437463
if ( $loc != $lastsnaploc) {
438464
$parenttime = $loc;
@@ -507,7 +533,8 @@
507533
$dbobj->getEnabled(),
508534
$uniquename,
509535
$parenttime,
510-
$crtime
536+
$crtime,
537+
$refreshdate
511538
);
512539
}
513540

@@ -682,6 +709,12 @@ =head1 OPTIONS
682709
with many (1000's) snapshots
683710
684711
712+
=item B<-timeflowparent>
713+
By default Parent Snapshot / Parent time will display a parent object snapshot used for provisioning
714+
or last refresh operation. With this flag set, dxtoolkit will use an old behaviour and
715+
display a timeflow parent snapshot which may be a parent database snapshot for provisioning / refresh
716+
or a current VDB snapshot if rollback operation was done.
717+
685718
=item B<-format>
686719
Display output in csv or json format
687720
If not specified pretty formatting is used.
@@ -734,6 +767,10 @@ =head1 COLUMNS
734767
735768
=item B<Parent time> - Parent time used for VDB provision (it can be snapshot time or exact time selected )
736769
770+
=item B<VDB creation time> - VDB creation time
771+
772+
=item B<VDB refresh time> - Last refresh time for VDB
773+
737774
=back
738775
739776
=head1 EXAMPLES

0 commit comments

Comments
 (0)