VSTS-Agent cannot chmod - azure-devops

(target machines : RedHat 7)
I use the "Copy File" task, which works fine when using the "Overwrite" option
but when not using that option , I receive a EPERM permission denied when the vstsagent tries to chmod some files already there
there is an obvious security policy that forbids anything else but root (and sudo commands) to do chmod's on the file system
how can we adress this issue without compromising our system security ?
thanks
2018-06-19T13:03:59.9255736Z ##[section]Starting: Copy Files to: /data/apache/var/www/html/******
2018-06-19T13:03:59.9380638Z ==============================================================================
2018-06-19T13:03:59.9408913Z Task : Copy Files
2018-06-19T13:03:59.9437816Z Description : Copy files from source folder to target folder using match patterns (The match patterns will only match file paths, not folder paths)
2018-06-19T13:03:59.9466225Z Version : 2.117.0
2018-06-19T13:03:59.9494054Z Author : Microsoft Corporation
2018-06-19T13:03:59.9522338Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=708389)
2018-06-19T13:03:59.9550616Z ==============================================================================
2018-06-19T13:04:00.5528521Z found 7 files
2018-06-19T13:04:00.5585656Z Copying /home/saehqvsts/vstsagent2/_work/r3/a/artifact/drop/delete_files.sh to /data/apache/var/www/html/******/delete_files.sh
2018-06-19T13:04:00.5743041Z Copying /home/saehqvsts/vstsagent2/_work/r3/a/artifact/drop/images/home/blog-image01.png to /data/apache/var/www/html/******/images/home/blog-image01.png
2018-06-19T13:04:00.5773633Z Copying /home/saehqvsts/vstsagent2/_work/r3/a/artifact/drop/images/home/blog-image02.png to /data/apache/var/www/html/******/images/home/blog-image02.png
2018-06-19T13:04:00.5803794Z Copying /home/saehqvsts/vstsagent2/_work/r3/a/artifact/drop/images/home/blog-image03.png to /data/apache/var/www/html/******/images/home/blog-image03.png
2018-06-19T13:04:00.5833235Z Copying /home/saehqvsts/vstsagent2/_work/r3/a/artifact/drop/index.php to /data/apache/var/www/html/******/index.php
2018-06-19T13:04:00.5861627Z shell.js: internal error
2018-06-19T13:04:00.5890403Z Error: EPERM: operation not permitted, chmod '/data/apache/var/www/html/******/index.php'
2018-06-19T13:04:00.5918532Z at Error (native)
2018-06-19T13:04:00.5946236Z at Object.fs.chmodSync (fs.js:1168:18)
2018-06-19T13:04:00.5975560Z at copyFileSync (/home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/node_modules/shelljs/src/cp.js:41:6)
2018-06-19T13:04:00.6005484Z at /home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/node_modules/shelljs/src/cp.js:198:5
2018-06-19T13:04:00.6034026Z at Array.forEach (native)
2018-06-19T13:04:00.6063516Z at Object._cp (/home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/node_modules/shelljs/src/cp.js:157:11)
2018-06-19T13:04:00.6094451Z at Object.cp (/home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/node_modules/shelljs/src/common.js:186:23)
2018-06-19T13:04:00.6124783Z at Object.cp (/home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/node_modules/vsts-task-lib/task.js:827:15)
2018-06-19T13:04:00.6154870Z at matchedFiles.forEach.err (/home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/copyfiles.js:119:20)
2018-06-19T13:04:00.6183521Z at Array.forEach (native)
2018-06-19T13:04:00.6774571Z ##[error]Exit code 1 returned from process: file name '/home/saehqvsts/vstsagent2/externals/node/bin/node', arguments '"/home/saehqvsts/vstsagent2/_work/_tasks/CopyFiles_5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c/2.117.0/copyfiles.js"'.
2018-06-19T13:04:00.6890413Z ##[section]Finishing: Copy Files to: /data/apache/var/www/html/******

That's because the files are existing there, you just need to clean up the existing files in that path or using the "Overwrite" option to overwrite them.

Related

Databricks Extension Fails for Visual Studio Code

I try to install extension below on VS Code, but nothing happens when I click "Configure Databricks"
Extension:
https://marketplace.visualstudio.com/items?itemName=databricks.databricks&ssr=false#qna
Details from Developer: Toggle Developer Tools
ERR Command failed:
c:\Users\user.name.vscode\extensions\databricks.databricks-0.2.3-win32-x64\bin\bricks
auth profiles --skip-validate Error: cannot parse config file: open
C:\Test" /M: The filename, directory name, or volume label syntax is
incorrect. : Error: Command failed:
c:\Users\user.name.vscode\extensions\databricks.databricks-0.2.3-win32-x64\bin\bricks
auth profiles --skip-validate Error: cannot parse config file: open
C:\Test" /M: The filename, directory name, or volume label syntax is
incorrect.
at ChildProcess.exithandler (node:child_process:408:12) at
ChildProcess.emit (node:events:526:28) at maybeClose
(node:internal/child_process:1092:16) at Socket.
(node:internal/child_process:451:11) at Socket.emit
(node:events:526:28) at Pipe. (node:net:687:12)
How can I fix it? Does anyone else had any issues?
It seems like the extension can't read your Databricks profile (~/.databrickscfg). Check if the file exists and if it contains potentially problematic contents.
I've create a ticket to track this issue https://github.com/databricks/databricks-vscode/issues/462

info: Trying to load file 'OEMFMFileList.xml' as a FM file list ... fatal error : Error: Missing package - Creating basic IoT Core Image Powershell

I am just trying to create a basic IoT core image by following this guide.
But I am always getting the below errors, whenever I run buildimage <product name> Test after building the BSP (Import-IoTBSP RPi2 C:\Downloads\RPi_BSP.zip (or) importbsp RPi2 C:\Downloads\RPi_BSP.zip
buildpkg RPi2)
info: Trying to load file 'C:\OEEWorkspace\Build\arm\InputFMs\OEMFMFileList.xml' as a FM file list ... fatal error : Error: Missing package: C:\OEEWorkspace\Build\arm\pkgs\test.OEM.Sample.cab
info: Trying to load file 'C:\OEEWorkspace\Build\arm\InputFMs\RPi2FMFileList.xml' as a FM file list ... fatal error : Error: Missing package:
I also followed this issue in GitHub, but couldn't find the exact issue. Have you ever faced any error something similar?
Huh!. It was a silly mistake. I didn't run the New-IoTCabPackage All (or) buildpkg all after building the BSP (Import-IoTBSP RPi2 C:\Downloads\RPi_BSP.zip (or) importbsp RPi2 C:\Downloads\RPi_BSP.zip
buildpkg RPi2). Hence the cab files were not pushed into the Build\arm\pkgs folder.
After running the buildpkg all I am able to see all the required cab files in the pkgs folder, thus no error. You must do the commands in the below order.
PS C:\OEE>importbsp RPi2 "C:\Users\SibeeshVenu\Downloads\RPi_BSP.zip"
PS C:\OEE>buildpkg all
PS C:\OEE>newproduct OEEIoTCore RPi2
PS C:\OEE>buildimage OEEIoTCore Test
Once that is done, you should be able to see an output as below.

VSTS Agent cannot overwrite nor remove the DLL when used by IIS

VSTS agent for AZure devOPS is not able to remove or overwrite the file when a URL has been invoked . However when the IIS worker process is killed and the Release is redeployed it is working fine .
I have enabled both overwrite and clean option . But it is still unable to deploy.
2018-11-17T13:05:23.2176452Z ##[section]Starting: Copy Files to: D:\IIS Hosting\CICD
2018-11-17T13:05:23.2179160Z ==============================================================================
2018-11-17T13:05:23.2179236Z Task : Copy Files
2018-11-17T13:05:23.2179314Z Description : Copy files from source folder to target folder using match patterns (The match patterns will only match file paths, not folder paths)
2018-11-17T13:05:23.2179373Z Version : 2.117.2
2018-11-17T13:05:23.2179438Z Author : Microsoft Corporation
2018-11-17T13:05:23.2179495Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=708389)
2018-11-17T13:05:23.2179554Z ==============================================================================
2018-11-17T13:05:23.4602460Z found 7 files
2018-11-17T13:05:23.4602904Z Cleaning target folder: D:\IIS Hosting\CICD
2018-11-17T13:05:23.4650798Z ##[error]Unhandled: Failed rmRF: EPERM: operation not permitted, unlink 'D:\IIS Hosting\CICD\AZSync.Web.dll'
2018-11-17T13:05:23.4659907Z ##[section]Finishing: Copy Files to: D:\IIS Hosting\CICD
Gives an error -
The solution was to have a task to copy app_offline.htm to the IIS hosting directory which would stop dotnet core from running . Copy/ overwrite all files and then remove app_offline.htmusing a delete file task.

opkg install error - wfopen no such file or directory

I have followed instructions to create an .ipk file, the Packages.gz and host them on a web server as a repo. I have set the opkg.conf in my other VM to point to this repo. The other VM is able to update and list the contents of repositories successfully.
But, when I try to install, I get this message. Can you please describe why I am getting this and what needs to be changed?
Collected errors:
* wfopen: /etc/repo/d1/something.py: No such file or directory
* wfopen: /etc/repo/d1/something-else.py: No such file or directory
While creating the .ipk, I had created a folder named data that had a file structure as /etc/repo/d1/ with the file something.py stored at d1 location. I zipped that folder to data.tar.gz. And, then together with control.tar.gz and 'debian-binary`, I created the .ipk.
I followed instructions from here:
http://bitsum.com/creating_ipk_packages.htm
http://www.jumpnowtek.com/yocto/Managing-a-private-opkg-repository.html
http://www.jumpnowtek.com/yocto/Using-your-build-workstation-as-a-remote-package-repository.html
It is very likely that the directory called /etc/repo/d1/ does not exist on the target system. If you create the folder manually, and try installing again, it probably will not fail. I'm not sure how to force opkg to create the empty directory by itself :/
Update:
You can solve this problem using a preinst script. Just create the missing directories on it, like this:
#!/bin/sh
mkdir -p /etc/repo/d1/
# always return 0 if success
exit 0

OMNET++/MIXIM : HOW CAN I CORRECT THE FOLLOWING COMPILER'S ERROR

Description Resource Path Location Type
make: * Config file '' does not exist -- add the OMNeT++ bin directory to the path so that opp_configfilepath can be found, or set the OMNETPP_CONFIGFILE variable to point to Makefile.inc. Stop. Makefile /IWF line 55 C/C++ Problem**
I had the same problem with OMNET++ 4.3.1, it turns out that i extracted the omnet source files to C:\Omnet rather than the default expected location c:/omnetpp-4.3.1 by the make script. So when you try to build the mixim, the build stops by giving two errors one of them being
make: *** Config file 'c:/omnetpp-4.3.1/Makefile.inc' does not exist --
To solve this issue, navigate to mixim(or whatever folder)>out>gcc-debug>.last-copts or you can search your workspace for something like omnetpp-4.3.1, remember the version, to locate the file. Then just change -Ic:/omnetpp-4../include to exact directory path where you have extracted omnet++.