Continuing my previous post: Provide version to independent files in clearcase. Now I able to execute clear case import command but with some errors. Following are some errors occurred while import:
clearfsimport: Error: Could not checkin "E:\CC_Work\FromCC\santosh_view57\Temp_TEST\AspNET\Scripts\WebForms\MSAjax\MicrosoftAjax.js".
clearfsimport: Warning: Trouble importing element "E:\CC_Work\FromCC\santosh_view57\Temp_TEST\AspNET\Scripts\WebForms\MSAjax\MicrosoftAjax.js".
Creating element "E:\CC_Work\FromCC\santosh_view57\Temp_TEST\AspNET\Scripts\WebForms\MSAjax\MicrosoftAjaxApplicationServices.js".
Created branch "TEST_TEMP" from "E:\CC_Work\FromCC\santosh_view57\Temp_TEST\AspNET\Scripts\WebForms\MSAjax\MicrosoftAjaxApplicationServices.js" version "\main\0".
clearfsimport: Error: Type manager "text_file_delta" failed create_version operation.
Following is my import command:
clearfsimport -rec -nset -comment "Commit test" F:\abc\ASPNET* E:\CC_Work\FromCC\santosh_view57\Temp_TEST\ASPNET
And config spec is following:
element * CHECKEDOUT
element * .../TEST_TEMP/LATEST
element * /main/LATEST -mkbranch TEST_TEMP
element * /main/LATEST
load \Temp_TEST
Same file is able to check out and check in using "ClearCase Expoler" GUI.
You might need to change the type manager associated to js files, as their content could not always be compatible with what a text_file_delta manager expects.
See "Type manager text_file_delta failed create_version operation" for concrete examples.
This technote lists the limitations which makes a text file fail:
Type manager size limitation - File too large
Text files that contain binary data - Contains a '\000'
Line exceeding 8000 bytes
Corrupt source container - not the highest on its branch
I have seen issue with the first 3.
If you have to change its type, see this technote.
Related
I am new to the OpenStack environment and started to get into it with a small DevStack setup. I worked the following instructions on a Ubuntu 18.04 machine through and everything worked fine. In order to play with some dns zones I started to research about designate. After adapting the following instructions to my setup I got some errors.
Executing stack.sh produces the following error:
++/opt/stack/designate/devstack/plugin.sh:source:5 set +o xtrace
2021-01-12 21:44:39.009 | Initializing Designate
DROP DATABASE
Could not load 'database': type object 'deprecated' has no attribute 'WALLABY'
Could not load 'pool': type object 'deprecated' has no attribute 'WALLABY'
Could not load 'tlds': type object 'deprecated' has no attribute 'WALLABY'
usage: designate [-h] [--config-dir DIR] [--config-file PATH] [--debug]
[--log-config-append PATH] [--log-date-format DATE_FORMAT]
[--log-dir LOG_DIR] [--log-file PATH] [--nodebug]
[--nouse-journal] [--nouse-json] [--nouse-syslog]
[--nowatch-log-file]
[--syslog-log-facility SYSLOG_LOG_FACILITY] [--use-journal]
[--use-json] [--use-syslog] [--watch-log-file]
{} ...
designate: error: argument category: invalid choice: 'database' (choose from )
Error on exit
World dumping... see /opt/stack/logs/worlddump-2021-01-12-214442.txt for details
nova-compute: no process found
neutron-dhcp-agent: no process found
neutron-l3-agent: no process found
neutron-metadata-agent: no process found
neutron-openvswitch-agent: no process found
I was not sure if my setup was legit. So I tried to use the example config from the designate tutorial. But the same problem occurred.
My actual local.conf:
[[local|localrc]]
USE_PYTHON3=True
ADMIN_PASSWORD=***
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=$ADMIN_PASSWORD
DEST=/opt/stack
SERVICE_HOST=192.168.1.***
HOST_IP=$SERVICE_HOST
disable_service mysql
enable_service postgresql
enable_plugin designate https://opendev.org/openstack/designate
enable_service tempest
Checking the plugin.sh. It looks like the error occurred from this function:
function init_designate {
# (Re)create designate database
recreate_database designate utf8
# Init and migrate designate database
$DESIGNATE_BIN_DIR/designate-manage database sync
init_designate_backend
}
Hope somebody can give me a hint to run DevStack with designate.
Thanks in advance.
The issue you are having is a version mismatch with the cloud install and the designate plugin. Designate is expecting a newer verison of the oslo_log package.
Check that the "devstack" version you have checked out is on the master branch.
The line:
enable_plugin designate https://opendev.org/openstack/designate
Is pulling the master branch of designate for the devstack plugin.
If you are trying to install on a stable branch version OpenStack, you will need to specify a reference for the devstack plugin as well (example, stable/victoria):
enable_plugin designate https://opendev.org/openstack/designate stable/victoria
As mentioned above, you will also need to enable the designate services:
enable_service designate,designate-central,designate-api,designate-worker,designate-producer,designate-mdns
How can I select an element with a specific baseline in a UCM ClearCase snapshot view config spec from a script?
I'm writing a script which will create a snapshot view of a given stream and should select a specific baseline version of the stream contents. I would prefer to set the element baseline in the same manner I'm setting the load rules but can't find a way to do that.
Here's what I'm doing so far:
...
cleartool mkview -snapshot -tag ${cc_view} -ptime -stream ${cc_stream}#\\myVob -vws ${cc_dir}/${cc_view}.vws ${cc_dir}/${cc_view} || die "Failed to create view. Exiting."
cd ${cc_dir}/${cc_view}
# Set the element baselines
cleartool edcs -overwrite
cleartool update -overwrite -add_loadrules ${components} || die "Failed to update view. Exiting."
...
Another issue might be that I can't set the element version in the config spec in the custom block - I have to do it in the component selection rules instead! Overwriting UCM's "Component selection rules" section feels a bit dangerous. I do this in the edcs phase:
ucm
identity UCM.Stream <...id...>
# ONLY EDIT THIS CONFIG SPEC IN THE INDICATED "CUSTOM" AREAS
# This config spec was automatically generated by the UCM stream
# "myStream" at 2017-06-01T07:43:33+02:00.
# Select checked out versions
element * CHECKEDOUT
# Component selection rules...
element "[ee5a<...id...>=\MYCOMPONENT]/..." my-component-1.0 -nocheckout
end ucm
#UCMCustomElemBegin - DO NOT REMOVE - ADD CUSTOM ELEMENT RULES AFTER THIS LINE
#UCMCustomElemEnd - DO NOT REMOVE - END CUSTOM ELEMENT RULES
# Non-included component backstop rule: no checkouts
element * /main/0 -ucm -nocheckout
#UCMCustomLoadBegin - DO NOT REMOVE - ADD CUSTOM LOAD RULES AFTER THIS LINE
load \MYCOMPONENT
Related questions:
UCM: How to create dynamic view (base clearcase) on arbitrary incremental baseline
Snapshot from old baseline
As VonC suggested I moved to base CC:
...
cleartool mkview -snapshot -tag ${cc_view} -ptime -vws ${cc_dir}/${cc_view}.vws ${cc_dir}/${cc_view} || die "Failed to create view. Exiting."
cd ${cc_dir}/${cc_view}
cat << EOF > config_spec
element * CHECKEDOUT
element * ${baseline} -nocheckout
element * /main/LATEST
EOF
cleartool setcs -force -overwrite config_spec || die "Failed to set config spec. Exiting."
cleartool update -overwrite -add_loadrules ${components} || die "Failed to update view. Exiting."
...
First, that will only work if the baseline is full.
If it is an incremental one, you have the risk of selecting an element with a label (associated to the baseline) which is not set on the parent folder, making that element inaccessible.
Second, that kind of custom selection is best done with a non-UCM base ClearCase snapshot view into which you have:
the same load rules as your UCM snapshot view
but a simpler set of selection rules:
element * yourBaselineId
element * /main/LATEST
I cannot add a new file to the VOB. I tried both UI context menu on windows as well as cleartool command line utility.
cleartool> checkout .
Checkout comments for ".":
Created branch "BRANCH_NAME" from "." version "\main\BASE_BRANCH_NAME\1".
Checked out "." from version "\main\BASE_BRANCH_NAME\BRANCH_NAME\0".
cleartool> mkelem -ci -nc NewFile.h
Created element "NewFile.h" (type "text_file").
cleartool: Error: Unable to check out "NewFile.h".
cleartool> uncheckout .
describe -l . shows me that the folder has rwx permissions. What am I doing wrong? Why I can't add file?
As mentioned in this thread (and already commented):
You'll need a rule that selects /main/0 or /main/LATEST
/main/0 is the placeholder version created for any new element added to source control.
See for instance "how to create a branch in ClearCase" or "How best to branch in Clearcase?" for an example of a config spec allowing to add to source control in a branch.
element * CHECKEDOUT
element * .../aBranch/LATEST
element * STARTING_LABEL -mkbranch aBranch
# selection rule for new "added to source control" file
element * /main/0 -mkbranch aBranch
element * /main/LATEST
learfsimport -rec -nset /view/abc_def/vobs/flo/floor/flore/flour/flow/fly/fi .
ClearCase brtype is not guarded by a stream: brtype:....
clearfsimport: Warning: Trigger "checkin" has refused to let checkin proceed.
clearfsimport: Error: Could not checkin "
ClearCase brtype is not guarded by a stream: brtype:
clearfsimport: Warning: Trigger "checkin" has refused to let checkin proceed.
clearfsimport: Error: Could not checkin "".
clearfsimport: Warning: Trouble importing element "".
Creating element "".
Does anybody know why I am getting the error like above.
Thanks
It looks like the clearfsimport is done in a non-UCM view, for a file which is already part of an UCM component.
You need to use an UCM view as destination for the clearfsimport.
Using IBM Rational ClearCase:
- I have only access to Snapshot Views so NO dynamic Views
I want to copy ALL versions from a certain changeset to c:\temp. I have already listed the changeset versions in a file (couple of hundred of versions, I only need the latest one), I do not have a baseline over this older set.
What I now have and does not work:
#!/usr/bin/perl -w
#
# PROGRAM: copytest.pl
$filename = "Design test123.doc";
$view = "D:\\AdminViews\\ABC_R1_READ_2\\ABCD002\\ABC_DESIGN\\BLA Framework\\P0\\";
$version = "\\main\\ABC_R1_READ\\1";
$printhet = 'cleartool find . -name "' . $filename . '" -version version(' . $version. ') -exec "cmd /c copy %CLEARCASE_XPN% D:\temp\%CLEARCASE_PN%"';
system($printhet);
Basically because: http://www-01.ibm.com/support/docview.wss?uid=swg21150317 (XPN)
update: I read In ClearCase, how can I view old version of a file in a static view, from the command line? again and I see that a diff with an empty file is the /hack for having no XPN. ok... but a diff with empty and a doc in the above gives me "0"
I am not sure what this IBM article (you mention in your question) can mean in your situation since it only works for dynamic view (if the view does not directly select the version you need).
And my old answer for accessing an extended path file content in a snapshot view is not trivial to adapt here.
So why not aim at something equivalent but simpler?
Why not create another snapshot view directly within c:\temp (c:\temp\myview_snap), with a config spec along the lines of (you can keep '/' instead of '\'):
element * CHECKEDOUT
element "/ABC_R1_READ_2/ABCD002/ABC_DESIGN/BLA Framework/P0/..." /main/ABC_R1_READ/1
element -directory "/ABC_R1_READ_2/ABCD002/ABC_DESIGN/BLA Framework/P0/..." /main/ABC_R1_READ/LATEST
element -directory "/ABC_R1_READ_2/ABCD002/ABC_DESIGN/BLA Framework/P0/..." /main/LATEST
element "/ABC_R1_READ_2/ABCD002/ABC_DESIGN/BLA Framework/P0/..." -none
element /ABC_R1_READ_2/ABCD002 /main/ABC_R1_READ/1
element /ABC_R1_READ_2/ABCD002 /main/LATEST
element /ABC_R1_READ_2/ABCD002/ABC_DESIGN /main/ABC_R1_READ/1
element /ABC_R1_READ_2/ABCD002/ABC_DESIGN /main/LATEST
element "/ABC_R1_READ_2/ABCD002/ABC_DESIGN/BLA Framework" /main/ABC_R1_READ/1
element "/ABC_R1_READ_2/ABCD002/ABC_DESIGN/BLA Framework" /main/LATEST
element * -none
load /ABC_R1_READ_2
That way, you should select:
any element under /ABC_R1_READ_2/ABCD002/ABC_DESIGN/BLA Framework/P0 (P0 included) with the right version
any directory which had not the exact version will try first to load itself as the LATEST on ABC_R1_READ, else as /main/LATEST as fallback (always exists)
if an element (file) has not that version, it won't be selected at all and not loaded.
any parent element (/ABC_R1_READ_2/ABCD002/ABC_DESIGN/BLA Framework), if it has not the right version, will be selected as /main/LATEST (always exist)
any other element (outside of the relevant tree) will be ignored, non-selected
Just tested it: it works fine.
Notes:
"BLA Framework" is a directory with a space in it, so you need to add the double quotes where it is used.
the load rule can just load the vob ABC_R1_READ_2: since the '-none' rules will not select what you don't need, they won't be loaded anyway.