Skip to content

Instantly share code, notes, and snippets.

@jeffwmiles
jeffwmiles / TeamsPresence-Photon
Created May 21, 2020 22:23
Particle Photon application for receiving Teams presence statuses
int red = D5;
int yellow = D4;
int green = D6;
void setup()
{
Particle.function("setStatus", setStatus);
pinMode(red, OUTPUT);
pinMode(yellow, OUTPUT);
@jeffwmiles
jeffwmiles / blobfuse_messages
Created April 24, 2020 19:39
errors encountered in blobfuse MSI load
Apr 24 12:12:35 train-t-orc1 kernel: fuse init (API version 7.27)
Apr 24 12:12:35 train-t-orc1 systemd: Mounting FUSE Control File System...
Apr 24 12:12:35 train-t-orc1 systemd: Mounted FUSE Control File System.
Apr 24 12:13:26 train-t-orc1 blobfuse[3991]: Fri Apr 24 12:13:26 2020 ==> REQUEST/RESPONSE#012#011GET https://stgacct.blob.core.windows.net/fuse?comp=list&delimiter=/&include=metadata&maxresults=10000&restype=container#012#011User-Agent: [Azure-Storage-Fuse/1.2.1]#012#011x-ms-date: [Fri, 24 Apr 2020 18:13:26 GMT]#012#011x-ms-version: [2017-11-09]#012#011Authorization: [REDACTED]#012#011Transfer-Encoding: []#012#011--------------------------------------------------------------------------------#012#011RESPONSE Status: 0
Apr 24 12:13:26 train-t-orc1 blobfuse[3991]: Fri Apr 24 12:13:26 2020 ==> REQUEST/RESPONSE#012#011GET https://stgacct.blob.core.windows.net/fuse?comp=list&delimiter=/&include=metadata&maxresults=10000&restype=container#012#011User-Agent: [Azure-Storage-Fuse/1.2.1]#012#011x-ms-date: [Fr
2020-03-31T21:19:09.111829Z INFO Daemon Agent WALinuxAgent-2.2.46 forwarding signal 15 to WALinuxAgent-2.2.46
2020-03-31T21:19:09.446124Z INFO Daemon Azure Linux Agent Version:2.2.46
2020-03-31T21:19:09.449782Z INFO Daemon OS: oracle 7.7
2020-03-31T21:19:09.456494Z INFO Daemon Python: 2.7.5
2020-03-31T21:19:09.461022Z INFO Daemon CGroups Status: The cgroup filesystem is ready to use
2020-03-31T21:19:09.464742Z INFO Daemon Run daemon
2020-03-31T21:19:09.466839Z INFO Daemon No RDMA handler exists for distro='Oracle Linux' version='7.7'
2020-03-31T21:19:09.476475Z INFO Daemon Error getting cloud-init enabled status from systemctl: Command '['systemctl', 'is-enabled', 'cloud-init-local.service']' returned non-zero exit status 1
2020-03-31T21:19:09.504466Z INFO Daemon Error getting cloud-init enabled status from service: Command '['service', 'cloud-init', 'status']' returned non-zero exit status 4
2020-03-31T21:19:09.512534Z INFO Daemon cloud-init is enabled: False
@jeffwmiles
jeffwmiles / StartVMInRG-Function.ps1
Created August 13, 2019 02:37
PowerShell script used in an Azure Function to start all VMs in a resource group
#This Azure Function is used to start VMs within a resource group
# It was originally created for eplansTest virtual machines, as a self-service endeavor.
# Calling the Function manually:
<#
$Body = @"
{
"resourcegroup": "source-rg",
"action": "start",
"subscriptionid": "<subID>",
@jeffwmiles
jeffwmiles / azurermerror.txt
Created October 11, 2018 04:02
Terraform azurerm provider error
PS /home/azureuser/clouddrive/PGH> terraform plan
Acquiring state lock. This may take a few moments...
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
Error: Error refreshing state: 1 error(s) occurred:
* provider.azurerm: Unable to list provider registration status, it is possible that this is due to invalid credentials or the service principal does not have permission to use the Resource Manager API, Azure error: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://management.azure.com/subscriptions/bc5242b8-a7be-4e2e-ae7e-57927f3b63ba/providers?api-version=2017-05-10: StatusCode=400 -- Original Error: adal: Refresh request failed. Status Code = '400'. Response body: {"error":{"code":"AudienceNotSupported","message":"Audience https://management.azure.com/ is not a supported MSI token audience. Supported audiences: https://management.core.window